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

[SymfonyValidator] @Assert\Valid() does not work #2

Open
patrykbaszak opened this issue Aug 14, 2023 · 0 comments
Open

[SymfonyValidator] @Assert\Valid() does not work #2

patrykbaszak opened this issue Aug 14, 2023 · 0 comments

Comments

@patrykbaszak
Copy link
Owner

patrykbaszak commented Aug 14, 2023

Currently, validation works correctly, i.e. it always validates nested values, but the original Symfony Validator does not - nested objects are only validated if the parent had @Assert\Valid() attributes. Therefore, it needs improvement.

In a call to the init() method of the SymfonyValidator modifier, we can create a list of all properties that can be validated, and then use the modifyPropertyExpression() method to check if that property is on that list.

@patrykbaszak patrykbaszak changed the title @Assert\Valid() does not work [SymfonyValidator] @Assert\Valid() does not work Aug 14, 2023
@patrykbaszak patrykbaszak pinned this issue Aug 14, 2023
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

No branches or pull requests

1 participant