minItems<T> method
A minimum items validator.
Implementation
ValidatorFn<List<T>> minItems<T>(int length, [String? message]) {
return (List<T>? value, BuildContext context) {
if (value != null && value.length < length) {
return message ?? HookFormScope.of(context).minItems(length);
}
return this.call(value, context);
};
}