These expressions are used in a validate
specification within a property definition block.
Keyword | Description |
---|---|
isRegEx: ["^[a-z]+$",'i'] | string conforms to a regular expression (RegExp) string |
notRegEx: ["^[a-z]+$",'i'] | any string other than characters represented in a regular expression (RegExp) string |
isLowercase: <boolean> | when set to true, checks for lowercase |
isUppercase: <boolean> | when set to true, checks for uppercase |
notNull: <boolean> | when set to true, won't permit null value |
isNull: <boolean> | when set to true, permits only a null value |
notEmpty: <boolean> | when set to true, don't permit empty strings |
equals: <string> | must match the given string |
contains: <string> | must contain the given substring |
notIn: ['foo', 'bar'] | check the value is not one of these |
isIn: ['foo', 'bar'] | check the value is one of these |
notContains: <string> | must not contain specific substrings |
len: [2,10] | only allow values with length between 2 and 10 |
isAfter: <date string> | only permit date strings after a specific date |
isBefore: <date string> | only permit date strings before a specific date |
max: <integer> | value must be less than or equal to <integer> |
min: <integer> | value must be greater than or equal to <integer> |