Skip to content

Commit 01b2a8f

Browse files
committed
fix(validators): resolve issue where email validator trims value before testing. fixes #979
1 parent 3deba40 commit 01b2a8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/form_builder_validators/lib/src/form_builder_validators.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class FormBuilderValidators {
151151
String? errorText,
152152
}) =>
153153
(valueCandidate) =>
154-
true == valueCandidate?.isNotEmpty && !isEmail(valueCandidate!.trim())
154+
true == valueCandidate?.isNotEmpty && !isEmail(valueCandidate ?? '')
155155
? errorText ?? FormBuilderLocalizations.current.emailErrorText
156156
: null;
157157

0 commit comments

Comments
 (0)