このようなことができます。角度パターンが不要です。
HTML
<form id="signup" method="post">
<input id="email" type="email" placeholder="Your e-mail." />
</form>
JS
$('#email').blur(function() {
validateEmail($('input').val());
return false;
});
function validateEmail(email) {
var re = /^\s*[\w\-\+_]+(\.[\w\-\+_]+)*\@[\w\-\+_]+\.[\w\-\+_]+(\.[\w\-\+_]+)*\s*$/;
if (re.test(email)) {
if (email.indexOf('@yourdomain.com', email.length - '@yourdomain.com'.length) !== -1) {
alert('Valid email.');
} else {
alert('Email must be a yourdomain e-mail address ([email protected]).');
}
} else {
alert('Not a valid e-mail address.');
}
}
チェックfiddle
Reference
http://stackoverflow.com/questions/153 71506/block-or-prevent-temporary-email-address-domains – Giri
何か試しましたか? –