onValidationError
fires when newly loaded/added/edited data fail to pass validation
function onValidationError( // the ID of the data item that is being validated id: number|string, // the data item object obj: object, // the validation result for data keys under validation details: object): void
Example
Section titled “Example”webix.grid({ rules:{ title:webix.rules.isNotEmpty, rating:webix.rules.isNumber }, on:{ onValidationError:function(id, obj, details){ var index = this.getIndexById(id)+1; console.log({ type:"error", text:"Empty title for row "+index }); } }});
also check the next samples:
Details
Section titled “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}