8000 [Form][Choice] If invalid value submitted radio\checkbox fields behavior not consistent with select one. · Issue #6352 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form][Choice] If invalid value submitted radio\checkbox fields behavior not consistent with select one. #6352

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

Closed
makasim opened this issue Dec 14, 2012 · 1 comment
Labels

Comments

@makasim
Copy link
Contributor
makasim commented Dec 14, 2012

If invalid value submitted the select choice throws an exception TransformationFailedException where radio\checkbox choices set the value to NULL.

This behavior cause some problems at validation stage.

  • First one is Choice constraint. It do nothing for NULL values.
  • Next problem more serious. If you dont have NotBlank constraint at the field you will pass validation with NULL value where someone would expect a value from choice set.

Personally I prefer TransformationFailedException for such cases.

@webmozart
Copy link
Contributor

Duplicate of #5113

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

No branches or pull requests

2 participants
0