Skip to content
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

Only allow whole numbers for matrix question inputs #2637

Merged
merged 2 commits into from
Oct 18, 2023

Conversation

TheDancingClown
Copy link
Contributor

📝 A short description of the changes

Front end validation

  • only allows whole numbers on input to matrix field

Back end validation

  • adds back end check for positive whole numbers in matrix vaildator and adds custom error.
  • replaces hardcoded "Required" error with custom error on matrix question view

🔗 Link to the relevant story (or stories)

:shipit: Deployment implications

  • none

✅ Checklist

  • Features that cannot go live are behind a feature flag/env var or specify deploy date and open PR as draft
  • I have checked that commit messages make sense and explain the reasoning for each change
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have squashed any unnecessary or part-finished commits

🖼️ Screenshots (if appropriate - no PII/Prod data):

Screenshot 2023-10-17 at 17 30 57

https://app.asana.com/0/1200504523179343/1205728016100849/f
Adds check on the back end if input is a whole number. If not adds a
new error message to the input.
Updates the matrix question view to display custom error.
@TheDancingClown TheDancingClown merged commit 00cf850 into main Oct 18, 2023
7 checks passed
@TheDancingClown TheDancingClown deleted the matrix-validation branch October 18, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants