Email string regex validator - Node.js String

Node.js examples for String:Parse

Description

Email string regex validator

Demo Code

  isEmail: function(email){
    if(/(.+)@(.+){2,}\.(.+){2,}/.test(email.trim())){
      return true;
    } else {//from w  w  w  . j  a  v  a2  s.  c  o  m
      return false;  
    }
  },

Related Tutorials