Update syntax and clarify use of outdated gem

This commit is contained in:
Maikel Linke
2023-05-15 16:18:45 +10:00
committed by Konrad
parent 90cbac7176
commit ef3422bf58

View File

@@ -51,7 +51,10 @@ module Spree
validates :email, 'valid_email_2/email': { mx: true }, if: :email_changed?
validate :limit_owned_enterprises
validates :uid, uniqueness: true, if: lambda { uid.present? }
validates_email :uid, if: lambda { uid.present? }
# Same validation as in the openid_connect gem.
# This validator is totally outdated but we indirectly depend on it.
validates :uid, email: true, if: lambda { uid.present? }
class DestroyWithOrdersError < StandardError; end