mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +02:00
Story#109014746 - ident_country_code should be only on create for now
This commit is contained in:
parent
9e9dbc813c
commit
08b0633ed4
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ class Contact < ActiveRecord::Base
|
|||
validates :ident,
|
||||
format: { with: /\d{4}-\d{2}-\d{2}/, message: :invalid_birthday_format },
|
||||
if: proc { |c| c.ident_type == 'birthday' }
|
||||
validates :ident_country_code, presence: true, if: proc { |c| %w(org priv).include? c.ident_type }
|
||||
validates :ident_country_code, presence: true, if: proc { |c| %w(org priv).include? c.ident_type }, on: :create
|
||||
validates :code,
|
||||
uniqueness: { message: :epp_id_taken },
|
||||
format: { with: /\A[\w\-\:]*\Z/i, message: :invalid },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue