ResolvableAttribute class final
A string attribute of a constraint, such as the regular expression of
@Matches, passed as an argument of a field error.
It is a message code of its own (the string itself), so a
MessageSource may translate it: the key \d{5}=five digits turns
must match {2} into must match five digits. When no key matches,
the plain string is used. The validator creates it; applications never
do. Spring's SpringValidatorAdapter.ResolvableAttribute.
// The arguments of an @Matches(r'\d{5}') error:
// [field, flags, ResolvableAttribute(r'\d{5}')]
- Implemented types
Constructors
- ResolvableAttribute(String value)
-
An argument for the attribute
value.const
Properties
-
arguments
→ List<
Object?> -
The values for the
{0},{1}, ... placeholders; an argument that is itself a MessageSourceResolvable is translated first.no setteroverride -
codes
→ List<
String> -
The codes tried in order; the last is the most general.
no setteroverride
- defaultMessage → String?
-
The text used when no code is found;
nullmakes a missing message an error.no setteroverride - hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → String
-
The attribute string, both message code and default message.
final
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.
override