Java: 20 Springboot: 3.0.1
```java @NotBlank(message = "userId id can not be blank.") @NotEmpty(message = "userId id can not be empty.") @UUID @User private String userId;
now in request, I am not passing userId, I am getting any of the 4 validation error, but I am expecting, it should fail in the first validation(`@NotBlank`) itself.
I tried using GroupSequence like
```java
@GroupSequence({Blank.class, Null.class, Empty.class, Custom.class, UserRequest.class})
@UserType
class UserRequest {
@NotEmpty(groups = Empty.class, message = "userId id can not be empty.")
@NotBlank(groups = Blank.class, message = "userId id can not be blank.")
@NotNull(groups = Null.class, message = "userId id can not be null.")
@UUID(groups = UID.class)
@User(groups = Custom.class)
private String userId;
}
Still randomly error message is coming, it should first give Blank error message, then Null, then empty, then UUID, then custom.
Comment From: wilkinsona
Thanks for the suggestion, but this is out of Spring Boot's control. I assume you're using Hibernate validator. It may be possible for it to order the reported constraint violations to match the order of the annotations but I'm not sure if the compiler, class file format, and reflection APIs provide any guarantees about that ordering. Also, please note that jakarta.validation.Validator.validate(T, Class<?>...) returns a Set<ConstraintViolation<T>> which further suggests that there may be no guarantees about the order of the constraint violations.