Link to home
Create AccountLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

Regex for valid date range

Is there a regex that allows a date that is after current date and less than a year in the future?
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

That's not a regex's job. That would need to be validated in code. Where and what format is date coming in?
Avatar of Larry Brister

ASKER

Theres an input form on a web page

I know I can validate in code behind but this is an older site and everything on this page is validated with RegEx for format etc.

Was just wondering if any type of a Regex or javaScrip would do the trick.
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks