[bbb-greenlight: 38/39] allow single quote inside email field (#2187)




commit ec4cde64ff96edc325cb6eb8ba797c2338fe5e02
Author: RomainNakedCat <60737618+RomainNakedCat users noreply github com>
Date:   Tue Oct 13 16:20:34 2020 +0200

    allow single quote inside email field (#2187)
    
    Co-authored-by: romainnakedcat <romainnakedcat@greenserver.novalocal>

 app/models/user.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/app/models/user.rb b/app/models/user.rb
index fc5d010..dd90c14 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -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
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]