(static) equal (negate, value, required, messageopt)
Tests if the value equals to the required value.
Parameters:
Name |
Type |
Attributes |
Description |
negate |
boolean
|
|
Negate the condition. |
value |
*
|
|
Tested value. |
required |
*
|
|
Required value. |
message |
string
|
<optional>
|
Custom error message. (optional) |
|
(static) haslength (negate, value, minopt, maxopt, messageopt)
Tests if the value has the required length.
Parameters:
Name |
Type |
Attributes |
Default |
Description |
negate |
boolean
|
|
|
Negate the condition. |
value |
*
|
|
|
Tested value. |
min |
int
|
<optional>
|
0
|
Minimum length of the value. (optional) |
max |
int
|
<optional>
|
min
|
Maximum length of the value. (optional) |
message |
string
|
<optional>
|
|
Custom error message. (optional) |
|
(static) inarray (negate, value, array, messageopt)
Tests if the value occurs in the array.
Parameters:
Name |
Type |
Attributes |
Description |
negate |
boolean
|
|
Negate the condition. |
value |
*
|
|
Tested value. |
array |
Array
|
|
Array of values. |
message |
string
|
<optional>
|
Custom error message. (optional) |
|
(static) isdecimal (negate, value, decimalPointopt, messageopt)
Tests if the value is decimal. Exponential notation is not allowed (e.g. 1.2e+25).
Parameters:
Name |
Type |
Attributes |
Default |
Description |
negate |
boolean
|
|
|
Negate the condition. |
value |
*
|
|
|
Tested value. |
decimalPoint |
string
|
<optional>
|
$.decimalPoint
|
Decimal separator. (optional) |
message |
string
|
<optional>
|
|
Custom error message. (optional) |
|
(static) isinteger (negate, value, messageopt)
Tests if the value is integer. Exponential notation is not allowed (e.g. 1e+25).
Parameters:
Name |
Type |
Attributes |
Description |
negate |
boolean
|
|
Negate the condition. |
value |
*
|
|
Tested value. |
message |
string
|
<optional>
|
Custom error message. (optional) |
|
(static) itemselected (negate, value, messageopt)
Tests if the array contains a checked or selected item.
Parameters:
Name |
Type |
Attributes |
Description |
negate |
boolean
|
|
Negate the condition. |
value |
Array
|
|
Tested array. |
message |
string
|
<optional>
|
Custom error message. (optional) |
Example:
column().validator('itemselected', 'children')
listBox().validator('itemselected', 'items')
// or:
listBox().validator('required', 'selection')
|
(static) maximum (negate, value, maxopt, messageopt)
Tests if the number is lesser than or equal to a given limit.
Parameters:
Name |
Type |
Attributes |
Default |
Description |
negate |
boolean
|
|
|
Negate the condition. |
value |
*
|
|
|
Tested value. |
max |
*
|
<optional>
|
0
|
Maximum value. (optional) |
message |
string
|
<optional>
|
|
Custom error message. (optional) |
|
(static) maxlength (negate, value, maxopt, messageopt)
Tests if the value has maximum length.
Parameters:
Name |
Type |
Attributes |
Default |
Description |
negate |
boolean
|
|
|
Negate the condition. |
value |
*
|
|
|
Tested value. |
max |
int
|
<optional>
|
0
|
Maximum length of the value. (optional) |
message |
string
|
<optional>
|
|
Custom error message. (optional) |
|
(static) minimum (negate, value, minopt, messageopt)
Tests if the number is greater than or equal to a given limit.
Parameters:
Name |
Type |
Attributes |
Default |
Description |
negate |
boolean
|
|
|
Negate the condition. |
value |
*
|
|
|
Tested value. |
min |
*
|
<optional>
|
0
|
Minimum value. (optional) |
message |
string
|
<optional>
|
|
Custom error message. (optional) |
|
(static) minlength (negate, value, minopt, messageopt)
Tests if the value has minimum length.
Parameters:
Name |
Type |
Attributes |
Default |
Description |
negate |
boolean
|
|
|
Negate the condition. |
value |
*
|
|
|
Tested value. |
min |
int
|
<optional>
|
0
|
Minimum length of the value. (optional) |
message |
string
|
<optional>
|
|
Custom error message. (optional) |
|
(static) pattern (negate, value, regexp, messageopt)
Tests if value matches the regular expression. Uses the Extend Script RegExp object.
Parameters:
Name |
Type |
Attributes |
Description |
negate |
boolean
|
|
Negate the condition. |
value |
*
|
|
Tested value. |
regexp |
RegExp
|
string
|
|
Regular expression or string. In case of string, the doubling of backslashles is necessary. |
message |
string
|
<optional>
|
Custom error message. (optional) |
|
(static) range (negate, value, minopt, maxopt, messageopt)
Tests if the value is in required range.
Parameters:
Name |
Type |
Attributes |
Default |
Description |
negate |
boolean
|
|
|
Negate the condition. |
value |
*
|
|
|
Tested value. |
min |
*
|
<optional>
|
0
|
Minimum value. (optional) |
max |
*
|
<optional>
|
min
|
Maximum value. (optional) |
message |
string
|
<optional>
|
|
Custom error message. (optional) |
|
(static) required (negate, value, messageopt)
Tests if the value is defined and is not empty string. Boolean values (true or false) are both OK.
Parameters:
Name |
Type |
Attributes |
Description |
negate |
boolean
|
|
Negate the condition. |
value |
*
|
|
Tested value. |
message |
string
|
<optional>
|
Custom error message. (optional) |
Example:
dropDownList().validator('required', 'selection')
editText().validator('required') // tests 'text' property
|