validates one record or all dataset against the validation rules
id | string | the id of the record to validate |
boolean | true, if the record is valid |
mylist = webix.ui({
view:"list",
template:"#rank#. #title#",
...
rules:{
title:webix.rules.isNotEmpty
}
});
/*validate all records*/
var result = mylist.validate();
/*validate first record*/
var result = mylist.validate(mylist.getFirstId());
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.