Removes validation from the control.
Syntax
ctrl.removeValidation(validation_type);
Arguments
validation_type
one of the available validation types:
Validation constant |
Description |
IsRequired |
Makes the field required. |
IsNumeric |
A number. |
IsPassword |
The password cannot be blank, cannot be 'Password' and should be at least 4 characters long. |
IsEmail |
A valid email address. |
IsMoney |
A numeric value. Decimal point is allowed. Examples: 13, 24.95. |
IsZipcode |
Five or ten digit number. Valid formats: 12345, 12345-6789 or 123456789. |
IsPhonenumber |
Numbers, spaces, hyphens, and parentheses are allowed. Examples: (123) 456-7890, 123 456 7890, 123 4567. |
IsState |
A two-letter US state abbreviation. Examples: AK, AL, CA, MN. |
IsSSN |
A nine-digit US social security number. Valid formats: 123-45-6789 or 123 45 6789. |
IsCC |
A valid credit card number. |
IsTime |
Any valid time format that matches regional settings. |
IsDate |
Any valid date format that matches regional settings. |
RegExp |
A regular expression (regexp). |
Return value
No return value.
Example
Remove the IsRequired validation from the control using the JavaScript OnLoad event:
var ctrl = Runner.getControl(pageid, 'Make');
ctrl.removeValidation("IsRequired");
See also:
•JavaScript API: Control object > getControl()
•JavaScript API: Control object > addValidation()
•JavaScript API: Control object > validate()
•JavaScript API: Control object > validateAs()
•JavaScript API: Control object > invalid()
•"Edit as" settings: Validation types
•JavaScript API: Control object