From 3b3bd67a3752ae00f8c33663741575ca69e6bc18 Mon Sep 17 00:00:00 2001 From: olegphenomenon Date: Tue, 17 May 2022 12:06:11 +0300 Subject: [PATCH] remove validates actions from contact and registrar --- app/models/contact.rb | 2 +- app/models/registrar.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/contact.rb b/app/models/contact.rb index 62dac37cf..12193a702 100644 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -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 }, diff --git a/app/models/registrar.rb b/app/models/registrar.rb index d7ba62306..aafc391cd 100644 --- a/app/models/registrar.rb +++ b/app/models/registrar.rb @@ -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