ValidationException class
The base of the exceptions that mean validation itself is set up wrongly: a bad constraint declaration or group definition, never an invalid value.
Invalid values are reported as violations or errors, not thrown. One of
these is a programming error to fix in the code; you do not normally
catch it, except to report it. Jakarta's ValidationException.
try {
validator.validateObject(form);
} on ValidationException catch (e) {
log.error(e.message); // a wrong declaration, not an invalid form
}
Spring (Java):
} catch (jakarta.validation.ValidationException e) { ... }
- Implemented types
Constructors
- ValidationException(String message)
-
An exception explaining the problem in
message.const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited