Skip to content

Instantly share code, notes, and snippets.

@elado
Created June 2, 2011 06:40
Show Gist options
  • Save elado/1004030 to your computer and use it in GitHub Desktop.
Save elado/1004030 to your computer and use it in GitHub Desktop.
Date Regexp Validator
^((29\/0?2(?=\/(\d{2}(0[48]|[13579][26]|[2468][048])|
([13579][26]|[2468][048])00))|([01]?\d|2[0-8])\/(0?\d|1[0-2])|
(29|30)\/(0?[13-9]|1[0-2])|31\/(0?[13578]|1[02]))\/\d{4})$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment