im trying to add bean validation to my form, when I leave the field blank,a red message should appear to the right displaying the error but no message appears. I'm using spring and JPA aswell
the code in the form is
<tr>
<td><form:label path="name">Name</form:label></td>
<td><form:input path="name" /></td>
<td style="color:red"><form:errors path="name"/> </td>
</tr>
the code in the JPA is
@Basic(optional = false)
@NotNull
@Column(name = "name")
@NotBlank(message = " field cannot be empty")
@Size(max = 50, message = "must be equal to or less then 50 chars")
private String name;