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

Update user.rb #2504

Closed
wants to merge 1 commit into from
Closed

Conversation

namanjain1812
Copy link
Contributor

Closes #1996

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with rake test
  • code is in uniquely-named feature branch and has no merge conflicts
  • PR is descriptively titled
  • PR body includes fixes #0000-style reference to original issue #
  • ask @publiclab/reviewers for help, in a comment below

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

We have a loose schedule of reviewing and pulling in changes every Tuesday and Friday, and publishing changes on Fridays.

Thanks!

@SidharthBansal
Copy link
Member

@namanjain1812 thanks for the pr.
Can you please see the discussion which we had earlier regarding this issue in #2169? You can look at the files it may help.
We are here to help you whenever you face any trouble ping any one of us.

@namanjain1812 namanjain1812 deleted the patch-3 branch March 16, 2018 16:45
@@ -13,6 +13,7 @@ class User < ActiveRecord::Base

acts_as_authentic do |c|
c.openid_required_fields = %i(nickname email)
VALID_EMAIL_REGEX = /\A[\w+-.]+@[a-z\d-.]+.[a-z]+\z/i
Copy link
Member

Choose a reason for hiding this comment

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

Please add the regex expression into
c.validates_format_of_email_field_options = { with: /@/ }
also we had a discussion about regex in other pr, please have a look at it.
Please refer rubular for regex.

@namanjain1812 namanjain1812 restored the patch-3 branch March 16, 2018 16:49
@SidharthBansal
Copy link
Member

@namanjain1812 oh I see you closed the pr. You can submit the changes into an existing branch. No need to close the pr and open a new one.

@namanjain1812 namanjain1812 reopened this Mar 16, 2018
@namanjain1812
Copy link
Contributor Author

namanjain1812 commented Mar 16, 2018

am closing this pr and making a final new one. Thanks for the help @SidharthBansal i figured out what to do.
here is the new pr #2506

@SidharthBansal
Copy link
Member

It would be great if we have one pr for one issue so that we can quickly see what discussion went previously. Hence, I will encourage you to make changes in the same pr.

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.

Add Email Validation
2 participants