-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Closed as not planned
Closed as not planned
Copy link
Labels
for: external-projectFor an external project and not something we can fixFor an external project and not something we can fixstatus: invalidAn issue that we don't feel is validAn issue that we don't feel is valid
Description
Java: 20
Springboot: 3.0.1
@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
@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.
Metadata
Metadata
Assignees
Labels
for: external-projectFor an external project and not something we can fixFor an external project and not something we can fixstatus: invalidAn issue that we don't feel is validAn issue that we don't feel is valid