Skip to content

Commit f8ac3cb

Browse files
committed
More tests with custom error
1 parent 67c6dc7 commit f8ac3cb

File tree

2 files changed

+589
-7
lines changed

2 files changed

+589
-7
lines changed

lib/src/form_builder_validators.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,9 @@ class FormBuilderValidators {
658658
final maxResult =
659659
max(maxValue, inclusive: inclusive, errorText: errorText)(number);
660660

661-
return errorText ?? minResult ?? maxResult;
661+
if (minResult != null || maxResult != null) {
662+
return errorText ?? minResult ?? maxResult;
663+
}
662664
}
663665
return null;
664666
};

0 commit comments

Comments
 (0)