Skip to main content

validate()

validates form fields

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 form visually

Returns:

The result of validation: true, if a form is valid; otherwise, false.

Example

var result = form.validate(true); // -> true/false

Related sample: Form. Validate

Starting with v7.0, the method validates only the required fields or the fields that contain validation rules.

Calling without the silent parameter, the method invokes the BeforeValidate and AfterValidate events and modifies the form visually.

var result = form.validate(); // -> true/false

Change log:

The silent parameter is added in v7.0.