forked from External/greenlight
allow single quote inside email field (#2187)
Co-authored-by: romainnakedcat <romainnakedcat@greenserver.novalocal>
This commit is contained in:
parent
c77ae11ea0
commit
ec4cde64ff
|
@ -41,7 +41,7 @@ class User < ApplicationRecord
|
|||
validate :check_if_email_can_be_blank
|
||||
validates :email, length: { maximum: 256 }, allow_blank: true,
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue