copyWith method
- bool? nullable,
- bool? optional,
- IValidator? condition,
- IValidator? then,
- IValidator? otherwise,
override
Creates a copy of the validator with the given parameters.
Implementation
@override
IValidator copyWith({
bool? nullable,
bool? optional,
IValidator? condition,
IValidator? then,
IValidator? otherwise,
}) {
return WhenValidator(
condition ?? this.condition,
then ?? this.then,
otherwise ?? this.otherwise,
nullable: nullable ?? isNullable,
optional: optional ?? isOptional,
);
}