JavaScript/jQuery Validator Validation Rules
CompareRule
A validation rule that demands that a validated editor has a value that is equal to a specified expression.
To specify the expression that the validated field must match, set the rule's comparisonTarget configuration option. Assign a function to this option. The validated value will be compared to the function's return value. The comparison will be performed by using the operator that is set for the comparisonType option.
See Also
CustomRule
The validation logic should be implemented within the validationCallback function. See this topic for details on using the custom rule for the server-side validation.
PatternRule
To specify the regular expression that the validated field must match, set the rule's pattern configuration option.
See Also
RangeRule
A validation rule that demands the target value be within the specified value range (including the range's end points).
To specify the range that the validated value must match, set the rule's min and max configuration options. Note that the specified range can be on a date-time or numeric scale. To validate a value against a string length, use the stringLength rule.
See Also
RequiredRule
Use this rule type to ensure the target editor value is specified. The rule will be broken in the following cases.
- If the validated value is null, false, or undefined.
- If the specified value has a type that is not expected for the target field (e.g., a string for the DateBox widget).
See Also
StringLengthRule
A validation rule that demands the target value length be within the specified value range (including the range's end points).