Validation Descriptor | Usage |
req | The field should not be empty |
maxlen=??? | checks the length entered data to the maximum. For example, if the maximum size permitted is 25, give the validation descriptor as "maxlen=25" |
minlen=??? | checks the length of the entered string to the required minimum. example "minlen=5" |
alnum | Check the data if it contains any other characters other than alphabetic or numeric characters |
alnum_s | Allows only alphabetic, numeric and space characters |
num | Check numeric data |
alpha | Check alphabetic data. |
alpha_s | Check alphabetic data and allow spaces. |
The field is an email field and verify the validity of the data. | |
lt=??? lessthan=??? | Verify the data to be less than the value passed. Valid only for numeric fields. example: if the value should be less than 1000 give validation description as "lt=1000" |
gt=??? greaterthan=??? | Verify the data to be greater than the value passed. Valid only for numeric fields. example: if the value should be greater than 10 give validation description as "gt=10" |
regexp=??? | Check with a regular expression the value should match the regular expression. example: "regexp=^[A-Za-z]{1,20}$" allow up to 20 alphabetic characters. |
dontselect=?? | This validation descriptor is for select input items (lists) Normally, the select list boxes will have one item saying 'Select One'. The user should select an option other than this option. If the value of this option is 'Select One', the validation description should be "dontselect=Select One" |
dontselectchk | This validation descriptor is for check boxes. The user should not select the given check box. Provide the value of the check box instead of ?? For example, dontselectchk=on |
shouldselchk | This validation descriptor is for check boxes. The user should select the given check box. Provide the value of the check box instead of ?? For example, shouldselchk=on |
dontselectradio | This validation descriptor is for radio buttons. The user should not select the given radio button. Provide the value of the radio button instead of ?? For example, dontselectradio=NO |
selectradio | This validation descriptor is for radio buttons. The user should select the given radio button. Provide the value of the radio button instead of ?? For example, selectradio=yes |
selmin=?? | Select atleast n number of check boxes from a check box group. For example: selmin=3 |
selone | Makes a radio group mandatory. The user should select atleast one item from the radio group. |
eqelmnt=??? | compare two elements in the form and make sure the values are the same For example, 'password' and 'confirm password'. Replace the ??? with the name of the other input element. For example: eqelmnt=confirm_pwd |
No comments:
Post a Comment