File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -36,4 +36,3 @@ class _CodePageState extends State<CodePage> {
36
36
);
37
37
}
38
38
}
39
-
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class FormBuilderValidators {
28
28
}) {
29
29
return (T ? valueCandidate) {
30
30
if (valueCandidate == null ||
31
- (valueCandidate is String && valueCandidate.isEmpty) ||
31
+ (valueCandidate is String && valueCandidate.trim (). isEmpty) ||
32
32
(valueCandidate is Iterable && valueCandidate.isEmpty) ||
33
33
(valueCandidate is Map && valueCandidate.isEmpty)) {
34
34
return errorText ??
Original file line number Diff line number Diff line change 1
1
import 'package:flutter/cupertino.dart' ;
2
2
import 'package:flutter/material.dart' ;
3
+ import 'package:flutter_form_builder/flutter_form_builder.dart' ;
3
4
import 'package:flutter_localizations/flutter_localizations.dart' ;
4
5
import 'package:flutter_test/flutter_test.dart' ;
5
- import 'package:flutter_form_builder/flutter_form_builder.dart' ;
6
6
7
7
/// Test Harness for running Validations
8
8
Future <void > testValidations (
@@ -69,6 +69,7 @@ void main() {
69
69
// Fail
70
70
expect (validatorString (null ), isNotNull);
71
71
expect (validatorString ('' ), isNotNull);
72
+ expect (validatorString (' ' ), isNotNull);
72
73
73
74
final validatorList =
74
75
FormBuilderValidators .required < List <int >> (context);
You can’t perform that action at this time.
0 commit comments