mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 19:48:28 +02:00
Merge branch 'story/109014746-update-only-ident-cc' into staging
This commit is contained in:
commit
6ddc59b271
2 changed files with 2 additions and 1 deletions
|
@ -23,7 +23,7 @@ class Contact < ActiveRecord::Base
|
||||||
validates :ident,
|
validates :ident,
|
||||||
format: { with: /\d{4}-\d{2}-\d{2}/, message: :invalid_birthday_format },
|
format: { with: /\d{4}-\d{2}-\d{2}/, message: :invalid_birthday_format },
|
||||||
if: proc { |c| c.ident_type == 'birthday' }
|
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,
|
validates :code,
|
||||||
uniqueness: { message: :epp_id_taken },
|
uniqueness: { message: :epp_id_taken },
|
||||||
format: { with: /\A[\w\-\:]*\Z/i, message: :invalid },
|
format: { with: /\A[\w\-\:]*\Z/i, message: :invalid },
|
||||||
|
|
|
@ -104,6 +104,7 @@ class Epp::Contact < Contact
|
||||||
res
|
res
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
delegate :ident_attr_valid?, to: :class
|
||||||
|
|
||||||
def epp_code_map # rubocop:disable Metrics/MethodLength
|
def epp_code_map # rubocop:disable Metrics/MethodLength
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue