Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Form] fixed false value being converted to an empty string in ChoiceArrayList#17372
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…ArrayListWhen `false` value is used as a choice value, it is converted to an empty string,which conflicts with the empty value, if the choice is optional. If the choiceis not optional, then there may be problems with html validation, since requiredchoice does not allow empty value to be submitted.This patch disables value casting to string, when the choice contains values,that would be converted to an empty string.
xabbuh commentedJan 14, 2016
I am not sure if this is the right fix but we would need a test in any case that ensures we do not break the behaviour again in the future. |
ivoazm commentedJan 15, 2016
Actually, when using Better solution would be then to convert |
xabbuh commentedFeb 11, 2016
ivoaz commentedFeb 11, 2016
No problem, I agree with you. |
When
falsevalue is used as a choice value, it is converted to an empty string,which conflicts with the empty value, if the choice is optional. If the choice
is not optional, then there may be problems with html validation, since required
choice does not allow empty value to be submitted.
This patch disables value casting to string, if the choices contain
falsevalue.