Skip to content

Display correct message when trying to enter value greater than limit #6454

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

Merged
merged 1 commit into from
Jun 3, 2025

Conversation

CarolineDenis
Copy link
Contributor

Fixes #2970

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone

Testing instructions

  • Open form (i.e new locality)
  • Enter required field
  • Enter 9999999999999999 in max uncertainty
  • Save
  • See that save is blocked
  • Verify there is an error message on max uncertainty saying: 'Value must be less or equal to 9007199254740991'

NOTES:
The issue is due to a JavaScript number precision limitation.
The maximum safe integer that can be accurately represented is 9007199254740991.
If you enter a number like 9999999999999999, JavaScript rounds it to the nearest representable value, which is 10000000000000000, due to precision loss.

@CarolineDenis CarolineDenis requested review from acwhite211 and a team May 13, 2025 16:56
Copy link
Collaborator

@emenslin emenslin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Verify there is an error message on max uncertainty saying: 'Value must be less or equal to 9007199254740991'

Looks good
Screenshot 2025-05-15 153408

@emenslin emenslin requested a review from a team May 15, 2025 20:37
Copy link
Collaborator

@combs-a combs-a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Verify there is an error message on max uncertainty saying: 'Value must be less or equal to 9007199254740991'

Error appeared properly, looks good.

@CarolineDenis CarolineDenis merged commit a4a796f into main Jun 3, 2025
12 checks passed
@CarolineDenis CarolineDenis deleted the issue-2970 branch June 3, 2025 15:28
@github-project-automation github-project-automation bot moved this from 📋Back Log to ✅Done in General Tester Board Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Saving a record with a numeric value that exceeds the maximum rounds up
5 participants