mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 00:12:03 +02:00
Updated contact doc and added too long epp message #2753
This commit is contained in:
parent
1143e16354
commit
d4a0f1e783
7 changed files with 19 additions and 16 deletions
|
@ -23,8 +23,8 @@ class Contact < ActiveRecord::Base
|
|||
validates :ident_country_code, presence: true, if: proc { |c| %w(bic priv).include? c.ident_type }
|
||||
validates :code,
|
||||
uniqueness: { message: :epp_id_taken },
|
||||
format: { with: /\A[\w\-\:]*\Z/i },
|
||||
length: { maximum: 100 }
|
||||
format: { with: /\A[\w\-\:]*\Z/i, message: :invalid },
|
||||
length: { maximum: 100, message: :too_long_contact_code }
|
||||
validate :ident_valid_format?
|
||||
|
||||
before_validation :set_ident_country_code
|
||||
|
|
|
@ -125,7 +125,9 @@ class Epp::Contact < Contact
|
|||
[:ident, :invalid],
|
||||
[:ident, :invalid_EE_identity_format],
|
||||
[:ident, :invalid_birthday_format],
|
||||
[:ident, :invalid_country_code]
|
||||
[:ident, :invalid_country_code],
|
||||
[:code, :invalid],
|
||||
[:code, :too_long_contact_code]
|
||||
],
|
||||
'2302' => [ # Object exists
|
||||
[:code, :epp_id_taken]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue