Skip to content

Instantly share code, notes, and snippets.

@felixzapata
Created August 21, 2014 18:19
Show Gist options
  • Save felixzapata/8bc885c74b03e7503d63 to your computer and use it in GitHub Desktop.
Save felixzapata/8bc885c74b03e7503d63 to your computer and use it in GitHub Desktop.
Formato fecha dd/mm/yyyy
return (/^([0-9]{2})\/([0-9]{2})\/([0-9]{4})$/).test(valor);
// http://www.mkyong.com/regular-expressions/how-to-validate-date-with-regular-expression/
// revisado
^(0?[1-9]|[12][0-9]|3[01])\/(0?[1-9]|1[012])\/((19|20)\d\d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment