JSR303 - Apply all validation-groups defined in sequence

戏子无情 提交于 2019-12-06 03:02:15

Ok, now I understand your question. The answer is that validation stops if there are one or more violations within a given group. To quote the spec:

Processing a group is defined in Section 4.6, “Validation routine” ; if one of the groups processed in the sequence generates one or more constraint violations, the groups following in the sequence must not be processed. This ensures that a set of constraint is evaluated only if another set of constraint is valid.

See http://beanvalidation.org/1.1/spec/#constraintdeclarationvalidationprocess-groupsequence-groupsequence

In your case there is a violation in the Default group which means the Special group is never validated.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!