ConstraintDeclarationException class

Thrown when a constraint is declared wrongly: invalid settings (Size(min: -1), min > max, a malformed regular expression), @ConvertGroup without @Valid(), or @Each on a value that is not a collection. Jakarta's ConstraintDeclarationException.

// @Size(min: 5, max: 2) String name = '';
validator.validateObject(form); // throws ConstraintDeclarationException

Spring (Java):

} catch (jakarta.validation.ConstraintDeclarationException e) { ... }
Inheritance
Implementers

Constructors

ConstraintDeclarationException(String message)
An exception explaining the wrong declaration in message.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
message → String
What is wrong and where, for the developer.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited