Skip to content

[Validator] Make class-level constraint execute after field-level #60815

Answered by stof
artyuum asked this question in Q&A
Discussion options

You must be logged in to vote

You can use a GroupSequence to first validate one group and then validate another one (and putting the class-level one constraint in the second group).

Note however that validation does not stop at the first violation being reported. So your class-level constraint will still need to handle the case where field-level constraints have detected an invalid state.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@artyuum
Comment options

@stof
Comment options

stof Jun 18, 2025
Collaborator

Answer selected by artyuum

This comment was marked as spam.

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