Dell Powerconnect W-ClearPass Hardware Appliances W-ClearPass Guest 6.0 Deploy - Page 163
Examples of Form field Validation, IsValidEmail, IsEqual, IsInRange, IsRegexMatch, Example 1, array1
View all Dell Powerconnect W-ClearPass Hardware Appliances manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 163 highlights
All fields must be successfully validated before any form processing can take place. This ensures that the form processing always has user input that is known to be valid. To validate a specific field, choose a validator from the drop-down list. See "Form Field Validation Functions" on page 298 for a description of the built-in validators. The Validator Param is the name of a field on the form, the value of which should be passed to the validator as its argument. This could be used to validate one field based on the contents of another. However, in most deployments this does not need to be set. Set the Validator Param to its default value, "(Use argument)", to provide a fixed value as the argument to the validator. The Validator Argument is used to provide further instructions to the selected validator. Not all validators require an argument; a validator such as IsValidEmail is entirely self-contained and will ignore the Validator Argument. Validators such as IsEqual, IsInRange and IsRegexMatch use the argument to perform validation. Examples of Form field Validation Example 1 - To create a form field that requires an integer value between 1 and 100 (inclusive) to be provided, use the following settings in the form field editor: NOTE: The form field will contain an integer value, so you should set the field's type to Integer when creating it. Use the PHP syntax array(1, 100) to specify the minimum and maximum values for the IsInRange validator. After saving changes on the form, this value will be internally converted to the equivalent code: array ( 0 => 1, 1 => 100, ) With these validator settings, users that enter an invalid value will now receive a validation error message: Furthermore, note that blank values, or non-numeric values, will result in a different error message: Dell Networking W-ClearPass Guest 6.0 | Deployment Guide Examples of Form field Validation | 163