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

NotEmptyValidator not working for radios and file inputs #157

Closed
rkrahnen opened this issue Aug 15, 2022 · 0 comments · Fixed by #158
Closed

NotEmptyValidator not working for radios and file inputs #157

rkrahnen opened this issue Aug 15, 2022 · 0 comments · Fixed by #158

Comments

@rkrahnen
Copy link
Contributor

The commit from #155 has the consequence that at least for radio buttons and file uploads the marking as mandatory field does not work anymore. Both elements have no request arguments if nothing was selected or uploaded, so the condition applies to these elements. As a result, the elements are not validated afterwards.

If you remove the condition, the validation works again. But this is surely not desired, so I looked a little further and if you move the line $registerPropertyPaths($element->getIdentifier()); to the beginning of the loop, the validation works as well. If I'm looking at this correctly after the short time, that should both solve the problem without breaking the change from #155.

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 a pull request may close this issue.

1 participant