If it fails, then the field will be highlighted and the failures will either be specified as a message below the
field or a label. Once the failure(s) has been rectified, the highlighting will disappear.
The following rules
are allowed:
empty
A field is not empty
checked
A checkbox field is checked
email
A field is a valid e-mail address
url
A field is a url
integer
A field is an integer value or matches an integer range*
decimal
A field must be a decimal number or matches a decimal range*
number
A field is any number or matches a number range*
regExp
Matches against a regular expression
creditCard
A field is a valid credit card**
contains
, doesntContain
A field (doesn't) contain text (case insensitive)
containsExactly
, doesntContainExactly
A field (doesn't) contain text (case sensitive)
is
, not
A field is (not) a value (case insensitive)
isExactly
, notExactly
A field is (not) a value (case sensitive)
minLength
, exactLength
, maxLength
A field is at least/exactly/at most a set length
match
, different
A field should (not) match the value of another validation field. Use the field ID as the value
minCount
, exactCount
, maxCount
A multiple select field contains at least/exactly/at most a set number of selections
*
For ranges, include the parameter value = "x..y"
where x
is the minimum value and y
is the maximum value.
Leave either side blank to not have a lower/upper limit
**
Include comma separated string of card providers if required e.g. value = "visa,mastercard"