-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Email Validation added #1120
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
Email Validation added #1120
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since there are no changes to package.json
, there should be no changes to package-lock.json
committed with this PR.
errors.email = 'Please enter an email.'; | ||
} else if ( | ||
// eslint-disable-next-line max-len | ||
!formProps.email.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's a file called client/utils/reduxFormUtils.js
that has validation functions, including a regex to validate an email address. i would put a function in there and use that regex!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@catarak Okay, I will use that file functions for validations.
thanks for working on this issue! |
… into email-validation
@catarak Please review it :) |
this works great. merging now! |
I have verified that this pull request:
Fixes #1119
npm run lint
)Fixes #123
@catarak Please review it :)