remove validates actions from contact and registrar

This commit is contained in:
olegphenomenon 2022-05-17 12:06:11 +03:00
parent 8a34e9e2ba
commit 3b3bd67a37
2 changed files with 3 additions and 3 deletions

View file

@ -49,7 +49,7 @@ class Contact < ApplicationRecord
validates :phone, presence: true, e164: true, phone: true
validate :correct_email_format, if: proc { |c| c.will_save_change_to_email? }
# validate :correct_email_format, if: proc { |c| c.will_save_change_to_email? }
validates :code,
uniqueness: { message: :epp_id_taken },

View file

@ -34,8 +34,8 @@ class Registrar < ApplicationRecord
attribute :vat_rate, ::Type::VatRate.new
after_initialize :set_defaults
validate :correct_email_format, if: proc { |c| c.will_save_change_to_email? }
validate :correct_billing_email_format
# validate :correct_email_format, if: proc { |c| c.will_save_change_to_email? }
# validate :correct_billing_email_format
alias_attribute :contact_email, :email