Skip to content
Snippets Groups Projects
Unverified Commit ec4cde64 authored by RomainNakedCat's avatar RomainNakedCat Committed by GitHub
Browse files

allow single quote inside email field (#2187)

parent c77ae11e
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ class User < ApplicationRecord ...@@ -41,7 +41,7 @@ class User < ApplicationRecord
validate :check_if_email_can_be_blank validate :check_if_email_can_be_blank
validates :email, length: { maximum: 256 }, allow_blank: true, validates :email, length: { maximum: 256 }, allow_blank: true,
uniqueness: { case_sensitive: false, scope: :provider }, uniqueness: { case_sensitive: false, scope: :provider },
format: { with: /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i } format: { with: /\A[\w+\-\'.]+@[a-z\d\-.]+\.[a-z]+\z/i }
validates :password, length: { minimum: 6 }, confirmation: true, if: :greenlight_account?, on: :create validates :password, length: { minimum: 6 }, confirmation: true, if: :greenlight_account?, on: :create
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment