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

Validation is retained when answer type is changed #548

Closed
russellshome opened this issue Apr 21, 2021 · 2 comments
Closed

Validation is retained when answer type is changed #548

russellshome opened this issue Apr 21, 2021 · 2 comments

Comments

@russellshome
Copy link

russellshome commented Apr 21, 2021

When an answer type is changed it should not keep any validation associated with the previous answer type.

Reproduction

Create a form with a Multiple choice answer.
Set the multiple choice answer to mandatory
Set the items to "choice 1" and "choice 2"
Submit and Save

Change the answer type of the Multi choice answer to Long answer
Submit and Save

Bug summary

Add the form to a page
View the page and attempt to submit a value of "test" as the Long answer

Outputs an error "Unexpected value: 'test'. Expected one of these: 'choice 1', 'choice 2'"

Specifics

v8.7.1 But I suspect this behaviour is the same for any version

Steps to reproduce

See above

Expected result

Any error message should relate to the answer type - not a previously set answer type.

Actual result

When multi choice is changed to Long answer then an error is output for valid content


This item has been added to our backlog AB#11607

@nul800sebastiaan
Copy link
Member

Thanks @russellshome, that's definitely a bug! We'll have to have a look at how we can fix that one.

@nul800sebastiaan nul800sebastiaan added state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks type/bug labels Apr 22, 2021
@AndyButland
Copy link

Resolved in the linked PR and due in 8.7.2,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants