Skip to content

Username validator defaults to requiring an email even if userType is not UT.email #495

@richardhaven

Description

@richardhaven
        widget.userValidator ?? FlutterLogin.defaultEmailValidator;

This should set specific validators based on userType (which might want an alias like userNameType)

To Reproduce
Steps to reproduce the behaviour:

  1. run an app with a FlutterLogin.userType = UserType.text;
  2. enter a non-email username
  3. submit
    Note the error message: Invalid email!

Expected behavior
appropriate validate for each value of UserType

Screenshots
screenshot FlutterLogin with a non-email

Workaround
Set an explicit validator

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions