From ec4cde64ff96edc325cb6eb8ba797c2338fe5e02 Mon Sep 17 00:00:00 2001 From: RomainNakedCat <60737618+RomainNakedCat@users.noreply.github.com> Date: Tue, 13 Oct 2020 16:20:34 +0200 Subject: [PATCH] allow single quote inside email field (#2187) Co-authored-by: romainnakedcat --- 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 fc5d0108..dd90c14e 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