mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Change contact email validation
This commit is contained in:
parent
1b06e43f18
commit
9f5a636d72
1 changed files with 2 additions and 2 deletions
|
@ -7,6 +7,7 @@ class Contact < ApplicationRecord
|
|||
include Concerns::Contact::Transferable
|
||||
include Concerns::Contact::Identical
|
||||
include Concerns::Contact::Disclosable
|
||||
include Concerns::EmailCheckable
|
||||
|
||||
belongs_to :original, class_name: self.name
|
||||
belongs_to :registrar, required: true
|
||||
|
@ -29,8 +30,7 @@ class Contact < ApplicationRecord
|
|||
|
||||
validates :phone, presence: true, e164: true, phone: true
|
||||
|
||||
validates :email, format: /@/
|
||||
validates :email, email_format: { message: :invalid }, 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 },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue