Class: Gitlab::Config::Entry::Validators::StringOrNestedArrayOfStringsValidator

Inherits:
NestedArrayOfStringsValidator show all
Defined in:
lib/gitlab/config/entry/validators.rb

Instance Method Summary collapse

Instance Method Details

#validate_each(record, attribute, value) ⇒ Object


246
247
248
249
250
# File 'lib/gitlab/config/entry/validators.rb', line 246

def validate_each(record, attribute, value)
  unless validate_string_or_nested_array_of_strings(value)
    record.errors.add(attribute, 'should be a string or an array containing strings and arrays of strings')
  end
end