Tobago has JSR 303 Validation support. With it, you can describe the validation in an annotation in the controller.
In this example, the input cannot be empty - in other words, it's required. The value in the controller is annotated with @NotNull.
@NotNull
The length of the given string must be between 2 and 4 characters.