ror_ecommerce icon indicating copy to clipboard operation
ror_ecommerce copied to clipboard

Referral email should be case_insensitive

Open jwjwyoung opened this issue 5 years ago • 0 comments

https://github.com/drhenner/ror_ecommerce/blob/3db5a29000ac93d6b896469511004e450d019042/app/models/referral.rb#L10

with current validation code, I can create referrals with same email adrress with lowercase/uppercase as attached.

image

I believe here should use validates :email, presence: true, uniqueness: {case_sensitive: false}, format: { with: CustomValidators::Emails.email_validator }

jwjwyoung avatar Apr 09 '19 20:04 jwjwyoung