validates one record or all dataset against validation rules
id | string | id of record to validate |
boolean | true if record is valid |
mygrid = webix.ui({
view:"list",
...
rules:{
"text":webix.rules.isNotEmpty
}
});
/*validate all records*/
var result = mygrid.validate();
/*validate first record*/
var result = mygrid.validate( mygrid.getFirstId() );
If id was not provided - component will validate all records.
Methods uses config.rules for validation
Invalid rows has "webix_invalid" marker on them
Back to top