with current validation code, I can create referrals with same email adrress with lowercase/uppercase as attached.
I believe here should use
validates :email, presence: true, uniqueness: {case_sensitive: false}, format: { with: CustomValidators::Emails.email_validator }
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.
I believe here should use
validates :email, presence: true, uniqueness: {case_sensitive: false}, format: { with: CustomValidators::Emails.email_validator }