Skip to content

Commit

Permalink
fix(ui): trim email before submitting (#8369)
Browse files Browse the repository at this point in the history
  • Loading branch information
lesnitsky committed Mar 31, 2022
1 parent 7edbf5e commit 4f9b885
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class _SignInFormContentState extends State<_SignInFormContent> {

void _submit([String? password]) {
final ctrl = AuthController.ofType<EmailFlowController>(context);
final email = widget.email ?? emailCtrl.text;
final email = (widget.email ?? emailCtrl.text).trim();

if (formKey.currentState!.validate()) {
if (widget.onSubmit != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class EmailInput extends StatelessWidget {
NotEmpty(l.emailIsRequiredErrorText),
EmailValidator(l.isNotAValidEmailErrorText),
]),
onSubmitted: (v) => onSubmitted(v!),
onSubmitted: (v) => onSubmitted(v!.trim()),
);
}
}

0 comments on commit 4f9b885

Please sign in to comment.