ConvertGroup class
An annotation next to @Valid() that checks the nested value with
another group: when the outer validation runs group from, the nested
value is checked with group to.
Use it when a nested object's rules depend on its owner's situation,
for example a car's driver whose licence only matters for the car's
checks. Without @Valid() it is a declaration error. Jakarta's
@ConvertGroup.
// The ordinary check of a Car checks its driver's DriverChecks rules.
abstract final class DriverChecks {}
@Introspected()
class Car {
@Valid()
@ConvertGroup(to: DriverChecks) // from: Default
Driver? driver;
}
Spring (Java):
@Valid
@ConvertGroup(from = Default.class, to = DriverChecks.class)
private Driver driver;
Constructors
- ConvertGroup({required Type to, Type from = Default})
-
Turns the group
from(by default Default) intotofor the nested value; one conversion perfromgroup.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.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited