RangeValidator<T> constructor
RangeValidator<T> (})
Constructor for the range validator.
Implementation
RangeValidator(
this.min,
this.max, {
this.inclusive = true,
/// {@macro base_validator_error_text}
super.errorText,
/// {@macro base_validator_null_check}
super.checkNullOrEmpty,
}) : _minValidator = MinValidator<T>(
min,
inclusive: inclusive,
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
),
_maxValidator = MaxValidator<T>(
max,
inclusive: inclusive,
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
),
_minLengthValidator = MinLengthValidator<T>(
min.toInt(),
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
),
_maxLengthValidator = MaxLengthValidator<T>(
max.toInt(),
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
);