src/core/validators/hibernateEmailValidator.js
function (value) {
        if (valdrUtil.isEmpty(value)) {
          return true;
        }

        // split email at '@' and consider local and domain part separately
        var emailParts = value.split('@');
        if (emailParts.length !== 2) {
          return false;
        }

        if (!localPattern.test(emailParts[0])) {
          return false;
        }

        return domainPattern.test(emailParts[1]);
      }
function (value) {
        if (valdrUtil.isEmpty(value)) {
          return true;
        }

        // split email at '@' and consider local and domain part separately
        var emailParts = value.split('@');
        if (emailParts.length !== 2) {
          return false;
        }

        if (!localPattern.test(emailParts[0])) {
          return false;
        }

        return domainPattern.test(emailParts[1]);
      }
function ( value ) { if ( valdrUtil . isEmpty ( value ) ) { return true ; } // split email at '@' and consider local and domain part separately var emailParts = value . split ( '@' ) ; if ( emailParts . length !== 2 ) { return false ; } if ( ! localPattern . test ( emailParts [ 0 ] ) ) { return false ; } return domainPattern . test ( emailParts [ 1 ] ) ; }
Checks if the value is a valid email address using the same patterns as Hibernate uses in its bean validation
implementation.

@param value the value to validate
@returns {boolean} true if valid
Checks if the value is a valid email address using the same patterns as Hibernate uses in its bean validation implementation .