Hibernate validator: Difference between @NotBlank and @NotEmpty

Recently i was teaching about using Hibernate Validator with Spring MVC. Because of that, i was checking the complete list of available annotations for bean properties.

Then, i discovered annotation @NotBlank, which was new for me because i only knew @NotEmpty and @NotNull. The documentation is clear to establish the difference between them:

Continue reading