mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-13 01:37:10 +02:00
22 lines
462 B
Ruby
22 lines
462 B
Ruby
class Fluentd
|
|
module Setting
|
|
module SectionValidator
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
validate :validate_sections
|
|
end
|
|
|
|
def validate_sections
|
|
self._section_params.each do |name, sections|
|
|
sections.each do |section|
|
|
if section.invalid?
|
|
errors.add(name, :invalid, message: section.errors.full_messages)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|