Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We don't want the front end to pass emails that are not valid in the backend. We use FILTER_VALIDATE_EMAIL from php which validates the emails if they match RFC-822 standards. According to those standards, the username part of the email can't be longer than 64 characters. This PR adds this condition in our regex for the email validation in JS.
See here a discussion about the email validation inconsistency throughout the project.
Fixed Issues
Part of Expensify/App#23180
Tests
usernamelongerthan64charactersshouldnotworkaccordingtorfc822whichisusedbyphp@gmail.com
QA
We'll be QA'd with the App PR