validate of ui.counter, Methods Webix Docs
validates value of input
boolean validate();
| boolean | result of validation |
Example
if ($$("mytext").validate()){
....
}
Related samples
Details
Note that for proper validation:
- input should be nested into a form;
- but only its own validation rule will be considered.
webix.ui({
view:"form",
elements:[
{ view:"text", required:true, name:"text1" },
{ view:"text", validate:webix.rules.isNumber, name:"text2" },
],
elementsConfig:{
on:{
'onChange':function(newv, oldv){
this.validate();
}
}
}
});
See also