validate

checks data in the form

boolean validate( [object mode] );
modeobjectvalidation mode for hidden and disabled fields
booleanresult of validation (success or failure)

Example

webix.ui({
    view:"form",
    elements:[
        { view:"text", label:'Login', name:"login" },
        { view:"text", label:'Email', name:"email" },
    ],
    rules:{
        "email":webix.rules.isEmail,
        "login":webix.rules.isNotEmpty
    }
});
 
$$("$form1").validate();

Related samples

Details

Note that the name property is required for controls, as it allows accessing the field through the form for validation.

Form is validated according to the rules you ought to define for the necessary form fields. See the corresponding chapter of the API reference.

Customizing validation logic

By default values of the hidden and disabled fields are not checked. If you want to include them into validation process, you need to provide a validation mode:

//hidden fileds will be validated
$$("$form1").validate({hidden:true});
 
//both hidden and disabled fields will be validated
$$("$form1").validate({hidden:true, disabled:true});

Note that if the form is hidden itself, hidden and visible fields are not separated.

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix open source html5 framework and page of javascript toolbar product.