Deployment Guide

300 | Form Field Validation Functions DellNetworking W-ClearPass Guest 6.0 | Deployment Guide
l IsValidLdapAttribute Checks that the value is a valid LDAP attribute name; that is, a string that starts with a
letter, and which contains only letters, numbers, underscore (_) and hyphen (-).
l IsValidNetmask Checks that the value is a valid network mask in dotted-quad notation; that is, an IP address
such as 255.255.255.128 that contains a single string of
N
1 bits followed by (32
N
) 0 bits.
l IsValidNumber Checks that the value is numeric; that is, an integer or a decimal value. The validator argument
may be an array containing one or more of the following additional options:
n no_negative if set to true, negative numbers are not accepted as a valid value.
n no_zero if set to true, zero is not accepted as a valid value.
n only_integer if set to true, decimal numbers are not accepted and only integer values are valid.
l IsValidPassword2 Checks that the value is a valid password that satisfies certain requirements. The validator
argument must be an array describing which of the following requirements to check. To perform any password
checking, the “minimum_length” and “complexity_mode” fields must be specified.
n password2 specifies the name of the field containing the duplicate password entry (optional, for password
validation). Defaults to “password2 if not specified.
n password2_required if nonzero, indicates that the “password2 entry must be supplied.
n username specifies the name of the field containing the username. If empty or unset, the password is not
checked against this field for a match.
n minimum_length specifies the minimum length of the password in characters.
n disallowed_chars if set, specifies characters that are not allowed in the password.
n complexity_mode specifies the set of rules to use when checking the password.
n complexity if set, specifies rules for checking the composition of the password. If unset, defaults to a preset
value for password complexity with modes none”, basic”, number”, punctuation” and “complex. These
rules check that passwords obey certain requirements according to the following table:
Rule Set Min. Length Description
none No special requirements
basic 8 Non-space characters
number 8 At least 1 digit
punctuation 8 At least 1 punctuation character (non-alphanumeric)
complex 8 At least 1 digit, 1 non-alphanumeric, 1 uppercase and 1 lowercase letter
Table 38:
Complexity Requirements
l IsValidSentence Checks that the value is considered to be a ‘sentence”; that is, a string which starts with an
upper-case letter and ends in a full stop.
l IsValidTimestamp Checks that the value is a numeric UNIX timestamp (which measures the time in seconds
since January 1, 1970 at midnight UTC).
l IsValidTimeZone Checks that the value is a valid string describing a recognized time zone.
l IsValidUrl Checks that the value appears to be a valid URL that includes a scheme, hostname and path. For
example, in the URL http://www.example.com/, the scheme is http, the hostname is www.example.com and the
path is /. The validator argument may optionally be an array containing a ‘scheme’ key that specifies an array of
acceptable URL protocols.
l IsValidUsername Checks that the value is a valid username. Usernames cannot be blank or contain spaces.