-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Birth date selector - Adding a really old date (>150 years) gives incorrect error #5667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Triggered auto assignment to @AndrewGable ( |
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
|
Code has a check for 150 years range. But that error will not make sense
cc. @flodnv |
We don't have a special error message for over 150 years. Currently we have kind of a workaround that doesn't scale well to handle having multiple errors for a single field, like 'Date of birth'. To do this, using the "workaround" we would have to:
Do we want add this new error for ages above 150 using this workaround? or do nothing until we design this better because the error is not very important? |
@aldo-expensify I would suggest limiting the calendar on the input to 150 years and showing the error only when age is less than 18. |
This is an extreme edge case so I'm removing it as a deploy blocker. |
When I worked on the datepicker I noticed that form validation is applied separately in a "boilerplate fashion" where each form would handle it on it's own I think, if we have or we're going to have more forms, we should extract validation even if we don't use an external library and code it ourselves |
Indeed, @aldo-expensify changed my more generic error message to a more specific one (see here). I do agree that more specific error messages are better, and I do agree that this one is an extreme edge case (worth considering nonetheless).
That wouldn't work in the case of manual (desktop keyboard) input, would it? @kidroca -- @marcaaron is currently working on a plan to revamp our form error messages. @marcaaron what would you recommend our approach should be with regards to this edge case? |
I think it might be fine to just do nothing in this case as 150 years is well above the average life expectancy for human beings and no one has ever lived that long as far as we know. Honestly though, I think if we are doing this so that there's a useful message when the user is inputting an unintentionally large date that is very wrong we should always give them a message that makes sense. Two ideas...
Limiting the range of the calendar seems like a good idea, but not sure we should replace the messaging with that for the reason @flodnv is bringing up. |
Issue reproducible during KI retests. |
@AndrewGable Eep! 4 days overdue now. Issues have feelings too... |
Issue reproducible during KI retests. |
Issue reproducible during KI retests. |
Issue reproducible during KI retests |
I agree, low priority. Let's close and reopen when we've fixed all the other bugs more important than this one. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
There should be an error mentioning the user to enter a valid date.
Actual Result:
There's an error mentioning the user is not over 18 years old (lol wat)
Workaround:
N/A visual issue (error not shown)
Platform:
Where is this issue occurring?
Version Number: 1.1.5-0
Reproducible in staging?: yes
Reproducible in production?: No
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by: Applause
Slack conversation:
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: