- sjpdAsked on May 21, 2015 at 07:44 PM
There's a bug in the date field validation where it will allow a user to manually enter "196" as a year.
It correctly invalidate "08-32-1961" but failed to prevent a date of "08-31-196".
I found this bug in our production database where an actual user submitted the incomplete year.
Please fix it... before it happens again. :-)
I am aware of the alternate Birthdate picker, but I don't want to change the field name and mess with our data import integration schema.
- JotForm SupportjonathanAnswered on May 21, 2015 at 09:08 PM
Thank you for sharing to us the info.
From what I understand though, the year '196' is actually a valid year, its just that it is very very old. So, the date validation did not fail. It was still able to validate the year value.
This is similar to what was discuss on this thread
Our dev are already working on an improvement for the Date field.
I will add this to the post that our dev have tag on so that this thread will be included also on the notification when there is update on the mentioned feature.
- sjpdAnswered on May 21, 2015 at 09:32 PM
Ha, "196" Very old year indeed.
It may then be a nice feature to be able to define a mask for the year, so we can enforce the 4 digit year. Or enable a property in the field options to define a valid range for the year.
Do you really think anyone, even those prolific online historians of the Roman Empire, are going to create a Jotform where years in the first millennium will be used in a form? I suppose it could happen... ;-)
- CharlieAnswered on May 21, 2015 at 11:42 PM
I think there's a new option in the DateTime field that you can use. Here's my form http://form.jotformpro.com/form/51409372483962?, see if you can set dates that are way very old. I've set an invalid date range from 0000-01-01 > 2015-05-25.
1. Here you'll see that 192 year is not valid anymore.
2. To set the date limit, you can follow the screenshots below.
3. You'll have plenty of options to limit the date, depending on the days, specific date or specific date range. In my end, I added a date range of 0000-01-01 > 2015-05-25 to be invalid dates.
Just a quick tip, if the limits you setup doesn't reset or doesn't update, you need to first click "Clear Limits"> Save > Save the form >Clear your form's cache.
I hope that helps.