Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch frontend login email validation #259

Merged
merged 3 commits into from
Jul 5, 2020
Merged

Patch frontend login email validation #259

merged 3 commits into from
Jul 5, 2020

Conversation

liangyuanruo
Copy link
Contributor

Problem

Closes #204

Solution

Frontend email validation with validator.isEmail.

Improvements:

  • Refactored the login flow from using IMinimatch directly, to accepting a function of type signature (email: string) => boolean.

Bug Fixes:

  • UI now checks that user input is an email on the login page.

Before & After Screenshots

BEFORE:
image

AFTER:
image

Tests

Tested against the following strings:

This enforces that a email is supplied and prevents a user from merely matching against the glob
expression.

fix #204
@liangyuanruo liangyuanruo requested a review from yong-jie July 5, 2020 17:29
… validator.isEmail

This also solves the issue of non-matching PropTypes
Copy link
Member

@yong-jie yong-jie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@liangyuanruo liangyuanruo merged commit aa61295 into develop Jul 5, 2020
@liangyuanruo liangyuanruo deleted the patch branch July 5, 2020 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Login UI bug
2 participants