minWordsCount static method

FormFieldValidator<String> minWordsCount(
  1. int minWordsCount, {
  2. String? errorText,
  3. bool checkNullOrEmpty = true,
})

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;