Skip to content

Instantly share code, notes, and snippets.

@borella
Last active December 30, 2015 07:38
Show Gist options
  • Save borella/7796800 to your computer and use it in GitHub Desktop.
Save borella/7796800 to your computer and use it in GitHub Desktop.
validate regex
FULL NAME
var reg = /^(?:[\u00c0-\u01ffa-zA-Z'-]){2,}(?:\s[\u00c0-\u01ffa-zA-Z'-]{2,})+$/i;
EMAIL
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
MAX CHARS
var reg = /^.{8,50}$/;
CEP
var reg = /^[0-9]{2}.[0-9]{3}-[0-9]{3}$/;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment