Home > Guides > Core Developers Guide > Annotations > Validations Annotation

If you want to use several annotations of the same type, these annotations must be nested within the @Validations() annotation.

Usage

Used at METHOD level.

Parameters

Parameter Required Notes
requiredFields no

Add list of RequiredFieldValidators
customValidators no Add list of CustomValidators
conversionErrorFields

no Add list of ConversionErrorFieldValidators
dateRangeFields no Add list of DateRangeFieldValidators
emails no Add list of EmailValidators
fieldExpressions no Add list of FieldExpressionValidators
intRangeFields no Add list of IntRangeFieldValidators
requiredStrings no Add list of RequiredStringValidators
stringLengthFields no Add list of StringLengthFieldValidators
urls no Add list of UrlValidators
visitorFields no Add list of VisitorFieldValidators
regexFields no Add list of RegexFieldValidator
expressions no Add list of ExpressionValidator

Examples

Different validations per method

Icon

Different validations per method is NOT supported for client-side validation!

To use different validations per method, the validateAnnotatedMethodOnly property must be set on the validation interceptor.

Here's a complete example of updating the default stack: