mirror of
https://github.com/internetee/registry.git
synced 2025-05-20 19:29:39 +02:00
Add mutually_exclusive helper
This commit is contained in:
parent
bfed783106
commit
62eb65793b
4 changed files with 47 additions and 6 deletions
|
@ -126,13 +126,12 @@ class Epp::DomainsController < EppController
|
|||
end
|
||||
|
||||
def validate_create
|
||||
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') }
|
||||
end
|
||||
|
||||
@prefix = 'create > create >'
|
||||
requires('name', 'ns', 'registrant', 'ns > hostAttr')
|
||||
|
||||
@prefix = 'extension > create >'
|
||||
mutually_exclusive 'keyData', 'dsData'
|
||||
|
||||
@prefix = nil
|
||||
requires('extension > extdata > legalDocument')
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue