mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 01:47:18 +02:00
Attribute is added to error messages
This commit is contained in:
parent
fdac633f07
commit
bca9ddef16
5 changed files with 72 additions and 61 deletions
|
@ -103,6 +103,7 @@ class EppController < ApplicationController
|
|||
el, missing = nil, nil
|
||||
selectors.each do |selector|
|
||||
full_selector = [@prefix, selector].compact.join(' ')
|
||||
attr = selector.split('>').last.strip.underscore
|
||||
el = params[:parsed_frame].css(full_selector).first
|
||||
|
||||
if allow_blank
|
||||
|
@ -112,7 +113,7 @@ class EppController < ApplicationController
|
|||
end
|
||||
epp_errors << {
|
||||
code: '2003',
|
||||
msg: I18n.t('errors.messages.required_parameter_missing', key: full_selector)
|
||||
msg: I18n.t('errors.messages.required_parameter_missing', key: "#{full_selector} [#{attr}]")
|
||||
} if missing
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue