minWordsCount static method
FormFieldValidator that requires the word count of the field's value to be greater than or equal to the provided minimum count.
Parameters:
minWordsCount
The minimum word count.errorText
The error message when the word count is invalid.checkNullOrEmpty
Whether to check for null or empty values.
Implementation
static FormFieldValidator<String> minWordsCount(
int minWordsCount, {
String? errorText,
bool checkNullOrEmpty = true,
}) => MinWordsCountValidator(
minWordsCount,
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;