When Val is
|
Validate returns False when
|
---|---|
Text
|
Min is supplied and Val has fewer than Min characters.
|
|
Max is supplied and Val has more than Max characters.
|
|
Expr is supplied and Val does not match the regular expression (see below). The whole text value needs to match the expression in order to pass validation.
|
Numeric (Long or Double)
|
Min is supplied and Val < Min.
|
|
Max is supplied and Val > Max.
|
|
Expr is supplied and Val isn’t in any of the defined valid ranges (see below).
|
Categorical
|
Min is supplied and Val has fewer than Min responses.
|
|
Max is supplied and Val has more than Max responses.
|
Date
|
Min is supplied and Val is earlier than the date whose internal representation is Min.
|
|
Max is supplied and Val is later than the date whose internal representation is Max.
|
|
Expr is supplied and Val isn't in any of the defined valid ranges (see below).
|
Range expression
|
Description
|
---|---|
5 .. 25
|
Val must be >= 5 and <= 25.
|
^ 5 .. 25
|
Val must not be >= 5 and <= 25 (in other words, it must be < 5 or > 25).
|
.. 10, 20, 30 .., ^70
|
Val must be <= 10, or 20, or >= 30, but not 70.
|
'10,5' .. "11,5", ^ '11,0'
|
With a Danish (or similar) input locale, Val must be >= 10.5 and <= 11.5, but not 11.0.
|
'Jan 1, 1960' .. 1980-12-31 23:59:59
|
Val must be (a date) later than or equal to 00:00:00 on January 1st 1960 and before or equal to 23:59:59 on December 31st 1980.
|
..
|
Any value is allowed.
|
^
|
No value is allowed.
|
Regular expression
|
Description
|
---|---|
.
|
Any character (including newline).
|
[abcn-z]
|
Any of the characters a, b, c, n, o, p, ..., z.
|
\w
|
Any alphanumeric character (including accents) or underscore (_).
|
\l
|
Any lower-case character (including accents).
|
\u
|
Any upper-case character (including accents).
|
\d
|
Any numeric character.
|
\s
|
A whitespace character.
|
xxx|yyy
|
Either xxx or yyy.
|
(xxx)
|
Grouping (subexpression).
|
x*
|
Zero or more occurrences of x.
|
x+
|
One or more occurrences of x.
|
x?
|
Zero or one occurrences of x.
|
(xxx){ m }
|
Exactly m occurrences of xxx.
|
(xxx){ m , n }
|
At least m and at most n occurrences of xxx.
|
\
|
The escape character that you use to match characters that have a special meaning in regular expressions, such as the following characters , . ? { } [ ] ( ) $ ^ *. For example, to match the { character, you would specify \{.
|