michaelsanford
Translator, Web Developer
What's the best way to check that a form's required fields meet criteria before parsing the form to a database?
In my instance there are no rules governing the input (for example, I allow phone numbers to be input as letters because 634-JERY is an acceptable number). I just want to make sure certain fields are not null and a minimum size (ex. phone number at least 7 digits).
The two major issues are that the correctly completed form fields should remain filled in. Also I'd like to avoid JS alert windows, since some text readers (for persons with visual impairments) may not understand them. As a result, I'd like to print a message at the top of the page.
So I'm probably looking at PHP eh?
In my instance there are no rules governing the input (for example, I allow phone numbers to be input as letters because 634-JERY is an acceptable number). I just want to make sure certain fields are not null and a minimum size (ex. phone number at least 7 digits).
The two major issues are that the correctly completed form fields should remain filled in. Also I'd like to avoid JS alert windows, since some text readers (for persons with visual impairments) may not understand them. As a result, I'd like to print a message at the top of the page.
So I'm probably looking at PHP eh?