We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f222cf commit 0487cceCopy full SHA for 0487cce
lib/src/form_builder_validators.dart
@@ -179,7 +179,7 @@ class FormBuilderValidators {
179
bool allowEmpty = false,
180
String? errorText,
181
}) {
182
- assert(minCount > 0);
+ assert(minCount > 0, 'The minimum words count must be greater than 0');
183
return (valueCandidate) {
184
int valueWordsCount = 0;
185
@@ -204,7 +204,7 @@ class FormBuilderValidators {
204
int maxCount, {
205
206
207
- assert(maxCount > 0);
+ assert(maxCount > 0, 'The maximum words count must be greater than 0');
208
209
int valueWordsCount = valueCandidate?.trim().split(' ').length ?? 0;
210
return null != valueCandidate && valueWordsCount > maxCount
0 commit comments