onValidationError of DataCollection, Events Webix Docs
objectthe data item object details
objectthe validation result for data keys under validation
Example
webix.ui({
view:"datatable",
rules:{
title:webix.rules.isNotEmpty,
rating:webix.rules.isNumber
},
on:{
onValidationError:function(id, obj, details){
var index = this.getIndexById(id)+1;
webix.message({ type:"error", text:"Empty title for row "+index });
}
}
});
Related samples
Details
The last parameter, details, contains invalid markers for each data key that has been validated and looks like:
{
title:true, // hasn't passed validation
rating:false // has passed validation
}
See also
Back to top