Annotation Interface ValidateWith
Validates a parameter by invoking a custom validation method inside the command class.
If the validation method throws an exception, it is caught and wrapped in a
ValidationException.-
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements
-
Element Details
-
value
String valueThe name of the validation method inside the command class.- Returns:
- the validation method name
-
message
String messageCustom message or translation key when validation fails. Supports placeholders like%1$sfor parameter name and%2$sfor the thrown exception message.- Returns:
- the error message or translation key
- Default:
""
-