validate of ui.sidebar, Methods Webix Docs
validates one record or all dataset against the validation rules
boolean validate( [string id] );
| boolean | true, if the record is valid |
Example
mygrid = webix.ui({
view:"datatable",
columns:[
{id:"rank", header:"", width:50, editor:"text"},
{id:"title", header:"Film title", width:200, editor:"text"},
{id:"votes", header:"Votes", width:100, editor:"text"}
],
rules:{
"rank":positiveNumber,
"votes":positiveNumber
}
});
/*validate all records*/
var result = mygrid.validate();
/*validate first record*/
var result = mygrid.validate(mygrid.getFirstId());
Related samples
Details
If the id was not provided, the component will validate all records.
The method uses config.rules for validation.
Invalid rows are displayed with the "webix_invalid" marker.
See also