rules

webix.rules

webix.rules helper.

Please look into the linked official documentation.

Referenced by

mixins
ValidateCollection(), ValidateData().

External references

Official documentation page.

Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
webix.rules = {
    isEmail: function(value){
        return (/^[^@]+@[^@]+\.[^@]+$/).test((value || "").toString());
    },
    isNumber: function(value){
        return (parseFloat(value) == value);
    },
    isChecked: function(value){
        return (!!value) || value === "0";
    },
    isNotEmpty: function(value){
        return (value === 0 || value);
    }
};
/*Data collection mapping logic */