Added ident country code error #2590

This commit is contained in:
Priit Tark 2015-06-01 17:48:23 +03:00
parent f5feba0509
commit 4448284680
5 changed files with 24 additions and 5 deletions

View file

@ -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

View file

@ -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]