mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
Bring back accidentally deleted regexp param required validation
Fixes #5500
This commit is contained in:
parent
0f478b4faa
commit
11c3b83d10
1 changed files with 4 additions and 0 deletions
|
@ -342,6 +342,10 @@ module LogStash::Config::Mixin
|
|||
@config.each do |config_key, config|
|
||||
next unless config[:required]
|
||||
|
||||
if config_key.is_a?(Regexp) && !params.keys.any? { |k| k =~ config_key }
|
||||
is_valid = false
|
||||
end
|
||||
|
||||
value = params[config_key]
|
||||
if value.nil? || (config[:list] && Array(value).empty?)
|
||||
@logger.error(I18n.t("logstash.runner.configuration.setting_missing",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue