layout: default title: RequiredStringValidator Annotation parent: title: Annotations url: annotations.html

RequiredStringValidator Annotation

This validator checks that a String field is not empty (i.e. non-null with a length > 0).

Usage

The annotation must be applied at method level.

Parameters

Examples

 @RequiredStringValidator(message = "Default message", key = "i18n.key", shortCircuit = true, trim = true)