I want to validate the length of a String before trying to insert/update the entity to the Database.
@Size(min = 1, max = 45)
@Column(name = "name", nullable = false, length = 45)
private String name;
My problem is the @Size annotation is not being recognized using NetBeans 7.3, JDK 1.6, EclipseLink (JPA 2.0).
Is there an alternative to this ?