Utilize the Play Framework to do much of the field validation for us.
In the form backing class, use this pattern:
@Required(message = "Please write a brief description of your routine.")
@MaxLength(value = 45, message = "Description can't be more than 45 characters.")
public String description;
Utilize the Play Framework to do much of the field validation for us. In the form backing class, use this pattern:
...to do validation.
Check this out: https://www.playframework.com/documentation/1.2.x/validation-builtin
Even though this is documented in an older version of Play, it's still in 2.x, though undocumented.