Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 798 forks source link

Contact Form / Date Picker: add date validation in all browsers #7888

Open jeherve opened 7 years ago

jeherve commented 7 years ago

In Firefox and Safari if I type in the date field, instead of using the date picker, I can enter any numbers (e.g. 12345) and submit the form. There’s no date validation.

screenshot 2017-09-28 at 15 48 58

It does not seem to be perfect in Chrome either:

In Chrome if I type in the date field it enforces the date to some extent, but I can enter a 6-digit year (e.g. 01/01/111111). The maximum year value it accepts is 275760, so maybe this is just the maximum year that Chrome accepts? It still seems weird.

rclations commented 6 years ago

@jeherve Since all validation was removed in #7890, is this something that should still be added?

jeherve commented 6 years ago

Good point.

I think I'll edit the original description, because I think it would be valuable to have date validation in the future.

stale[bot] commented 6 years ago

This issue has been marked as stale. This happened because:

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.

jeherve commented 4 years ago

This was also brought up in #16815. cc @MuhammedSwalihct

Now that a few years have passed, it may be worth reconsidering using the date input type we had removed in #7890. Browser support may have improved over the years.

jeherve commented 2 months ago

Related: #11251