Hi webix team,
I need for a project complex validation rules. For my work I took the example http://webix.com/snippet/b981cbe5 and changed it to http://webix.com/snippet/73addacd - but this don’t work, because the invalidMessage not appear. Thanks for advice.
Hi,
The $obj key specifies the validation of the entire data object, but not the particular field. If you want to set an invalid message to some field, you should use the markInvalid
method:
http://webix.com/snippet/4629cf5f
Moreover, you can simplify your code a bit: there’s no need to use this.getValues()
, as the method with the $obj key receives the necessary object.
Hi Listopad, very nice solution, a lot of thanks