mirror of
https://github.com/internetee/registry.git
synced 2025-08-12 12:39:34 +02:00
111601356-errors_customization
This commit is contained in:
parent
7d1decbc87
commit
7a27756a36
3 changed files with 5 additions and 2 deletions
|
@ -33,7 +33,7 @@ class Contact < ActiveRecord::Base
|
||||||
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 },
|
||||||
length: { maximum: 100, message: :too_long_contact_code }
|
length: { maximum: 100, message: :too_long_contact_code }
|
||||||
validates :ident_type, inclusion: {in: %w( org priv birthday), message: :invalid}
|
validates :ident_type, inclusion: {in: %w( org priv birthday), message: :ident_type_invalid}
|
||||||
validate :val_ident_valid_format?
|
validate :val_ident_valid_format?
|
||||||
validate :uniq_statuses?
|
validate :uniq_statuses?
|
||||||
validate :validate_html
|
validate :validate_html
|
||||||
|
|
|
@ -126,13 +126,15 @@ class Epp::Contact < Contact
|
||||||
[:ident, :invalid_birthday_format],
|
[:ident, :invalid_birthday_format],
|
||||||
[:ident, :invalid_country_code],
|
[:ident, :invalid_country_code],
|
||||||
[:ident_type, :missing],
|
[:ident_type, :missing],
|
||||||
[:ident_type, :invalid],
|
|
||||||
[:code, :invalid],
|
[:code, :invalid],
|
||||||
[:code, :too_long_contact_code]
|
[:code, :too_long_contact_code]
|
||||||
],
|
],
|
||||||
'2302' => [ # Object exists
|
'2302' => [ # Object exists
|
||||||
[:code, :epp_id_taken]
|
[:code, :epp_id_taken]
|
||||||
],
|
],
|
||||||
|
'2304' => [
|
||||||
|
[:ident_type, :invalid, { value: { obj: 'ident_type', val: ident_type } }]
|
||||||
|
],
|
||||||
'2305' => [ # Association exists
|
'2305' => [ # Association exists
|
||||||
[:domains, :exist]
|
[:domains, :exist]
|
||||||
],
|
],
|
||||||
|
|
|
@ -266,6 +266,7 @@ en:
|
||||||
unimplemented_command: 'Unimplemented command'
|
unimplemented_command: 'Unimplemented command'
|
||||||
domain_exists_but_belongs_to_other_registrar: 'Domain exists but belongs to other registrar'
|
domain_exists_but_belongs_to_other_registrar: 'Domain exists but belongs to other registrar'
|
||||||
required_ident_attribute_missing: "Required ident attribute missing: %{key}"
|
required_ident_attribute_missing: "Required ident attribute missing: %{key}"
|
||||||
|
ident_type_invalid: 'Ident type is invalid'
|
||||||
|
|
||||||
code: 'Code'
|
code: 'Code'
|
||||||
value: 'Value'
|
value: 'Value'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue