victorjonsson / jQuery-Form-Validator

[DISCONTINUED] jQuery plugin that makes it easy to validate user input while keeping your HTML markup clean from javascript code.
972 stars 476 forks source link

Birthday Validation appears to be about a month off. #624

Open raalin19 opened 7 years ago

raalin19 commented 7 years ago

I'm trying to validate a birthday being over 21 years of age. I've set the following options on the input:

data-validation="required date birthdate" data-validation-format="mm/dd/yyyy" data-validation-age-range="21-124" data-validation-error-msg-date="Please enter a valid date MM/DD/YYYY" data-validation-error-msg-format="Please enter a valid date MM/DD/YYYY" data-validation-error-msg-required="Please enter your date of birth." data-validation-error-msg-birthdate="You must be 21 or over to register."

For the most part it appears to work correctly, however it is about 28 days off. For example today is 08/07/2017 Entering 08/06/1996 triggers an error and displays the 'correct' message. Entering anything on or before 07/07/1996 succeeds, but 07/08/1996 also proves to be invalid.

Any advice?