Additional validation required for Self-Registration DOB field
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:
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.