We're updating the issue view to help you get more done. 

@NotEmpty and @NotBlank definition is not consistent with other constraints

Description

@NotEmpty and @NotBlank constraints are composed with @NotNull. This doesn't adhere to the apparent convention followed by the remaining standard constraints.

In practical terms, this forces possibly unwanted mandatory for annotated elements. At the very least there should be an out-of-the-box version of these constraints that is not composed with @NotNull.

Quotes from the current source code:

1 2 3 4 5 @NotNull @Size(min = 1) public @interface NotEmpty { ... }
1 2 3 4 @NotNull public @interface NotBlank { ... }

Environment

HV 4.3.2

Status

Assignee

Unassigned

Reporter

Tiago Marques

Labels

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

Yes, likely

Requires Release Note

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Affects versions

5.0.0.Final
5.1.3.Final
4.3.2.Final

Priority

Minor