Skip to content

Instantly share code, notes, and snippets.

@trumball
Created September 26, 2013 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save trumball/6718359 to your computer and use it in GitHub Desktop.
Save trumball/6718359 to your computer and use it in GitHub Desktop.
HTML5 allows, among other things, to validate emails using a regular expression pattern. Here is a ready to use input field with the regexp pattern to validate an email address.
<input type="text" title="email" required pattern="[^@]+@[^@]+\.[a-zA-Z]{2,6}" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment