mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
Added ident country code error #2590
This commit is contained in:
parent
f5feba0509
commit
4448284680
5 changed files with 24 additions and 5 deletions
|
@ -181,7 +181,7 @@ class Contact < ActiveRecord::Base
|
|||
if code
|
||||
self.ident_country_code = code.alpha2
|
||||
else
|
||||
errors.add(:ident_country_code, 'is not following ISO_3166-1 alpha 2 format')
|
||||
errors.add(:ident, :invalid_country_code)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -123,7 +123,8 @@ class Epp::Contact < Contact
|
|||
[:email, :invalid],
|
||||
[:ident, :invalid],
|
||||
[:ident, :invalid_EE_identity_format],
|
||||
[:ident, :invalid_birthday_format]
|
||||
[:ident, :invalid_birthday_format],
|
||||
[:ident, :invalid_country_code]
|
||||
],
|
||||
'2302' => [ # Object exists
|
||||
[:code, :epp_id_taken]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue