Annotation Type CustomCollectionPostConversionValidation


@Documented @Inherited @Target(FIELD) @Retention(RUNTIME) public @interface CustomCollectionPostConversionValidation

Defines custom validation of a collection of converted values and error message to display if this fails. The custom validator must implement CollectionPostConversionValidator, preferably extending AbstractCustomCollectionPostConversionValidatorSupport, and have a default public constructor.

By default, messages are added to the actionErrors list but this can be overridden by messageType:

Message Types
ERROR Message added to Action level error messages. Default.
FIELD Message added to field error messages using same name as field.
MESSAGE Message added to Action level info messages.
WARNING Message added to Action level warning messages.

Other parameters

Other Parameters
message If not empty string, text message to display. Used if messageKey is empty string or finds no message.
messageKey If not empty string, message key to retrieve from Action's TextProvider. Uses message if no key provided or no message found.
param1 Parameter recognised by custom validator. Defaults to empty string.
param2 Parameter recognised by custom validator. Defaults to empty string.
param3 Parameter recognised by custom validator. Defaults to empty string.
param4 Parameter recognised by custom validator. Defaults to empty string.
param5 Parameter recognised by custom validator. Defaults to empty string.
shortCircuit If true and this validation fails, skips further validation. Defaults to false.
processNoValue If true, can validate null value and empty collection. Defaults to false.
validatorClass Class of client supplied validator. See notes above.