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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix contradictory form errors on survey form #9186

Merged
merged 3 commits into from Apr 29, 2022

Conversation

lahdeero
Copy link
Contributor

馃帺 What? Why?

After leaving mandatory sort answer field in survey blank, it gives two contradictory erros: "Body can't be blank" and "There are too many choices selected" which doesn't make any sense for normal people (or even to me).

馃搶 Related Issues

Testing

  1. Create survey with mandatory short answer field and matrix with max choices
  2. Go to survey's page, click sort answer input and press tab
  3. Select more options than max choices from the matrix

馃摲 Screenshots

image

鈾ワ笍 Thank you!

@andreslucena andreslucena added module: surveys type: fix PRs that implement a fix for a bug labels Apr 25, 2022
@andreslucena
Copy link
Member

Thanks for the PR @lahdeero!!
Can you do a regression spec please?

Copy link
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@andreslucena andreslucena changed the title Fix contradictory form erros on survey form Fix contradictory form errors on survey form Apr 28, 2022
@ahukkanen ahukkanen merged commit 0dafdef into decidim:develop Apr 29, 2022
@ahukkanen ahukkanen deleted the fix/survey_form_errors branch April 29, 2022 14:09
andreslucena pushed a commit that referenced this pull request May 6, 2022
* Add max choice alert only if theres max choices

* Update test

* Check that translation matches
ahukkanen pushed a commit that referenced this pull request May 10, 2022
* Add max choice alert only if theres max choices

* Update test

* Check that translation matches

Co-authored-by: Eero Lahdenper盲 <eero.lahdenpera@gmail.com>
@alecslupu alecslupu added this to the 0.27.0 milestone Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: surveys type: fix PRs that implement a fix for a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplication of error messages
4 participants