mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Validate legal doc type
This commit is contained in:
parent
00091c5502
commit
16df29ffc2
3 changed files with 38 additions and 1 deletions
|
@ -59,6 +59,13 @@ class EppController < ApplicationController
|
|||
validation_method = "validate_#{params[:action]}"
|
||||
return unless respond_to?(validation_method, true)
|
||||
send(validation_method)
|
||||
|
||||
# validate legal document's type here because it may be in most of the requests
|
||||
@prefix = nil
|
||||
if element_count('extension > extdata > legalDocument') > 0
|
||||
requires_attribute('extension > extdata > legalDocument', 'type', values: LegalDocument::TYPES)
|
||||
end
|
||||
|
||||
handle_errors and return if epp_errors.any?
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue