Additional validation required for Self-Registration DOB field

Bug #2073005 reported by Jason Boyer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
New
Undecided
Unassigned

Bug Description

All supported Eg versions affected

The patron self-registration page does some date validation - you can't have a date of birth of Frebtember 41rd or anything like that, but if you should type 2024-02-31 into the field, it will helpfully be changed to 2024-03-02 on its way to the database. This is also the case after applying the omnibus fix in bug 2065448, which sets min and max values on the 3 dob fields.

While there are few almost-valid dates this affects we should try to validate what we send to the server rather than allow it to be made "close enough" to some other date.

Having done a little experimenting I suspect JavaScript because PostgreSQL will have no truck with `SELECT '2024-06-31'::DATE` and the DateTime::Format::ISO8601 Perl module does not like it either.

The date pickers in the staff client seem to be more strict, not allowing 2024-06-31, so this likely only affects the self registration page.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.