Skip to main content

validate()

validates a SimpleVault control

validate(silent?: boolean): boolean;

Parameters:

silent: boolean - optional, if true - the method will return the result of validation without calling validation events and without modifying the control visually

Returns:

true, if a control is valid; otherwise, false.

Example

form.getItem("simplevault").validate(true);// -> true/false

When calling without the silent parameter or setting it to false, the method invokes the BeforeValidate and AfterValidate events and visually modifies the control.

form.getItem("simplevault").validate(); // -> true/falseform.getItem("simplevault").validate(false); // -> true/false

Change log:

The silent parameter is added in v7.0