Underscore helper - checkif a string is a valid email
// isEmail underscore helper | |
// source: https://gist.github.com/tracend/7763827 | |
_.mixin({ | |
isEmail: function( email ){ | |
var format = /^[a-zA-Z0-9\-_]+(\.[a-zA-Z0-9\-_]+)*@[a-z0-9]+(\-[a-z0-9]+)*(\.[a-z0-9]+(\-[a-z0-9]+)*)*\.[a-z]{2,4}$/; | |
return (email.match(format)); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
Hi,
Seems above not works for new .marketing domain email address.
Eg: test@test.marketing