Annotation Type CustomListPostConversionValidation
Defines custom validation of an array or collection of converted values and error message to display if this
fails. This is useful for validating the list as a whole, such as non-empty list, and is run after individual
entry post-conversion validators. The custom validator must implement ListPostConversionValidator,
preferably extending AbstractCustomListPostConversionValidatorSupport, and have a default public
constructor.
By default, messages are written as Action error messages for form processing Actions and logged as warnings for
viewer Actions but this can be overridden by messageType. For viewer Actions, it's recommended they
implement LoggingAware (which AbstractViewActionSupport already does).
| DEFAULT | Uses default setting of controlling interceptor or library, which is usually Action error messages for form processing Actions and logged as warnings for view ActionsMessage. Default. |
| ERROR | Message added to Action level error messages. |
| FIELD | Message added to field error messages using same name as field. |
| IGNORE | Message is not shown to user or logged. This is not recommended. |
| LOG_DEBUG | Logged to Action's Log4j2 logger (or controlling interceptor's if not available) at DEBUG level. |
| LOG_ERROR | Logged to Action's Log4j2 logger (or controlling interceptor's if not available) at ERROR level. |
| LOG_INFO | Logged to Action's Log4j2 logger (or controlling interceptor's if not available) at INFO level. |
| LOG_TRACE | Logged to Action's Log4j2 logger (or controlling interceptor's if not available) at TRACE level. |
| LOG_WARN | Logged to Action's Log4j2 logger (or controlling interceptor's if not available) at WARN level. |
| MESSAGE | Message added to Action level info messages. |
| WARNING | Message added to Action level warning messages. |
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. |
This annotation applies a list post-conversion validator, which comes after post-conversion validators. It only applies to array or collection non-string fields.
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescription -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanboolean
-
Element Details
-
message
String message- Default:
""
-
messageKey
String messageKey- Default:
""
-
messageType
Required.MessageType messageType- Default:
DEFAULT
-
param1
String param1- Default:
""
-
param2
String param2- Default:
""
-
param3
String param3- Default:
""
-
param4
String param4- Default:
""
-
param5
String param5- Default:
""
-
shortCircuit
boolean shortCircuit- Default:
false
-
processNoValue
boolean processNoValue- Default:
true
-
validatorClass
Class<? extends ListPostConversionValidator<CustomListPostConversionValidation,?>> validatorClass
-