I have a question relate to valid for each element in form control.
webix.ui({
view:“form”,
elements:[
{ view:“text”, required:true, name:“text1” },
{ view:“text”, invalidMessage: “init”, name:“text2” },
],
elementsConfig:{
on:{
‘onChange’:function(newv, oldv){
this.validate();
}
}
},
rules: {
text2: function (value) {
if (!value) {
$$(“text2”).define(“invalidMessage”, “Text2 can not be empty”);
return false;
}
}
});
It didn’t work with this.validate().
How can we validate for each element with custom valid rule for it.