Extend isEmail rule

Is it possible to add a check for a trailing character with a isEmail rule?


  • Hello,

    Basic isEmail rule works as follows:

        return (/\S+@[^@\s]+\.[^@\s]+$/).test((value || "").toString());

    You can add your own custom rule to check any required criteria:

    webix.rules.customRule = function(value, valuesObj, inputName){
         // a rule function gets ui.form as `this` in scope
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion