A validation rule with custom validation logic.
Specifies the message that is shown for end-users if the current rule is broken.
You do not have to specify this field. In this instance, a default message will be shown. To include the name of the validated editor into the default validation message as a subject, set the name field of the dxValidator object.
If you assign an empty string to the message field, the message will not be shown.
Indicates whether the rule should be always checked for the target value or only when the target value changes.
Specifies the type of the current rule.
Set this field to 'custom' to define a rule that will be broken as a result of custom validation performed by the validationCallback function.
A function that validates the target value.
An object defining validation parameters.
A Boolean value that indicates whether the validated value is valid against the checked rule.
In this function, you should indicate whether or not the validated value breaks the current rule. To access the validated value, use the value field of the parameter passed to the function. To access the current rule, use the rule field of the function parameter. Set the rule's isValid field. In addition, you can specify the rule's message field, as well as other fields that are specific for the current rule type, which is specified by the rule's type field.
As an alternative to the rule's isValid field, you can use the function's return value to specify the validation result.