Created
July 20, 2015 00:41
-
-
Save skipjac/18eb5d7df948aaa6a269 to your computer and use it in GitHub Desktop.
Validate email in zendesk Help Center ticket forms.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('input').keyup(function(e){ | |
var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; | |
if(e.target.name === 'request[anonymous_requester_email]'){ | |
var match = re.test(e.target.value); | |
console.log(match); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment