Added ident country code and improved other ident things

This commit is contained in:
Priit Tark 2015-02-18 15:26:51 +02:00
parent e9b77c5b0f
commit 44f11de5c8
13 changed files with 117 additions and 66 deletions

View file

@ -20,8 +20,9 @@ class Epp::Contact < Contact
at[:auth_info] = f.css('authInfo pw').text if f.css('authInfo pw').present?
if f.css('ident').present? && f.css('ident').attr('type').present?
at[:ident] = f.css('ident').text
at[:ident_type] = f.css('ident').attr('type').text
at[:ident] = f.css('ident').text
at[:ident_type] = f.css('ident').attr('type').try(:text)
at[:ident_country_code] = f.css('ident').attr('cc').try(:text)
end
at[:address_attributes] = {}.with_indifferent_access
@ -69,7 +70,8 @@ class Epp::Contact < Contact
'2005' => [ # Value syntax error
[:phone, :invalid],
[:email, :invalid],
[:ident, :invalid]
[:ident, :invalid],
[:ident, :not_valid_EE_identity_format]
]
}
end

View file

@ -129,7 +129,7 @@ class Epp::EppDomain < Domain
next
end
if k == :admin && contact.juridical?
if k == :admin && contact.bic?
add_epp_error('2306', 'contact', x[:contact], [:domain_contacts, :admin_contact_can_be_only_citizen])
next
end