You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
patrykbaszak
changed the title
@Assert\Valid() does not work
[SymfonyValidator] @Assert\Valid() does not work
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 themodifyPropertyExpression()
method to check if that property is on that list.The text was updated successfully, but these errors were encountered: