mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
fix config :number validation
This commit is contained in:
parent
42394069a9
commit
7706953586
1 changed files with 2 additions and 2 deletions
|
@ -188,8 +188,8 @@ module LogStash::Config::Mixin
|
|||
if value.size > 1 # only one value wanted
|
||||
return false, "Expected number, got #{value.inspect}"
|
||||
end
|
||||
if value != value.to_i.to_s # Try convert to number
|
||||
return false, "Expected number, got #{value.inspect}"
|
||||
if value.first.to_s.to_i.to_s != value.first.to_s
|
||||
return false, "Expected number, got #{value.first.inspect}"
|
||||
end
|
||||
result = value.first.to_i
|
||||
when :boolean
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue