Created
September 10, 2018 11:31
-
-
Save shohag-cse-knu/14a8be7db3f7cefea8e782c46dd31d6b to your computer and use it in GitHub Desktop.
jQuery Regex date validation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var date_regex = /^(0[1-9]|1[0-2])\/(0[1-9]|1\d|2\d|3[01])\/(19|20)\d{2}$/ ; | |
if(!(date_regex.test(inputed_date)) | |
{ | |
return false; | |
}else{ | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment