mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-15 18:57:10 +02:00
Empty section is valid in most case
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
parent
00fcad0e1e
commit
0ca86c8f33
@ -10,6 +10,7 @@ class Fluentd
|
|||||||
def validate_sections
|
def validate_sections
|
||||||
self._section_params.each do |name, sections|
|
self._section_params.each do |name, sections|
|
||||||
sections.each do |section|
|
sections.each do |section|
|
||||||
|
next if section.attributes.values.all?(&:blank?)
|
||||||
if section.invalid?
|
if section.invalid?
|
||||||
errors.add(name, :invalid, message: section.errors.full_messages)
|
errors.add(name, :invalid, message: section.errors.full_messages)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user