Skip to content

Instantly share code, notes, and snippets.

@carlos-sanchez
Created November 14, 2013 04:27
Show Gist options
  • Save carlos-sanchez/7461353 to your computer and use it in GitHub Desktop.
Save carlos-sanchez/7461353 to your computer and use it in GitHub Desktop.
Email validation. 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