Skip to content

Dynamically configure validation groups on MapRequestPayload and MapQueryString attributes #51012

Discussion options

You must be logged in to vote

If the validation groups depend on the state of the underlying object you can use #[Assert\GroupSequenceProvider] and determine the groups dynamically.
https://symfony.com/doc/current/validation/sequence_provider.html#group-sequence-providers

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@MilanKaranovicQuantox
Comment options

Answer selected by MilanKaranovicQuantox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants