I have the following property in Spring MVC Form bean using javax.validation.constraints to validate the bean form as follows:
public class MyForm { @Size(min = 2, max = 50) private String postcode;
My question is: does @Size(min = 2) mean that a property cannot be null since it will always require a length greater than 2. The reason I say this is because there is a @NotNull constraint in the same package and therefore makes the redundant @NotNull restriction redundant if I have to use it in the bean above.
source share