Validate domain create elements with nesting

This commit is contained in:
Martin Lensment 2015-01-21 13:38:21 +02:00
parent 3b4bebaf2d
commit bc80274109
2 changed files with 3 additions and 3 deletions

View file

@ -126,7 +126,7 @@ class Epp::DomainsController < EppController
def validate_create
# TODO: Verify contact presence if registrant is juridical
ret = epp_request_valid?('name', 'ns', 'registrant', 'legalDocument', 'hostAttr')
ret = epp_request_valid?('name', 'ns', 'registrant', 'extension > extdata > legalDocument', 'ns > hostAttr')
if params[:parsed_frame].css('dsData').count > 0 && params[:parsed_frame].css('create > keyData').count > 0
epp_errors << { code: '2306', msg: I18n.t('ds_data_and_key_data_must_not_exists_together') }