isNumber

checks whether the value in the text field is numeric

boolean isNumber(any value);
valueanythe value to check
booleantrue, if the value is a number

Example

rules:{ //component name is used to apply the rule to it
  login: webix.rules.isNumber
}

Related samples

Details

All characters typed into the specified text field must be numbers to pass validation.

You can call this function explicitely to perform the related check, as follows:

if(webix.rules.isNumber(value)){
   // your logic
}
See also
Back to top