Furthermore, note that blank values, or non-numeric values, will result in a different error message:
The reason for this is that in this case, the validation has failed due to a type error – the field is specified to
have an integer type, and a blank or non-numeric value cannot be converted to an integer. To set the error
message to display in this case, use the Type Error option under the Advanced Properties.
Example 2 – To create a form field that accepts one of a small number of string values, use the following
settings in the form field editor:
This example could be used for a string field named visitor_department. Because the values are known in
advance, a drop-down list is the most suitable user interface. An initial value for the form field, as shown
above, could be used if most visitors are in fact there to visit the sales team.
To match against a list of options used for a drop-down list or set of radio buttons, you can use the
IsInOptionsList validator.
Example 3 – To create a form field that validates U.S. social security numbers using a regular expression,
use the following settings in the form field editor:
Note that the regular expression used here includes beginning and ending delimiters (in this case the /
character), and ensures that the whole string matches by the start-of-string marker ^ and the end-of-string
marker $. The construct \d is used to match a single digit. Many equivalent regular expressions could be
written to perform this validation task. See
"Regular Expressions"
in the Reference chapter for more
information about regular expressions.
174
| Guest Management
Amigopod 3.7 | Deployment Guide
Need help?
Do you have a question about the PowerConnect W Clearpass 100 Software and is the answer not in the manual?
Questions and answers