If I am using the javax.validation.Validator
to validate an object annotated with constraints, will it always evaluate the field level constraints before the object?
For example if I have:
@DummyClassValidation
public static class DummyClassToValidate {
private Integer myNum;
@Min(value = 50)
@Max(value = 100)
public Integer getMyNum() {
return myNum;
}
public void setMyNum(Integer myNum) {
this.myNum = myNum;
}
}
And I validate it, is it guaranteed that the @DummyClassValidation
will be evaluated only after @Min
and @Max
? I know I can do so with Groupings but I rather not if I don't have to (i.e. Field validations are implicitly grouped to validate before object validations).