Class: Gitlab::Config::Entry::Validators::ArrayOfStringsOrStringValidator

Inherits:
RegexpValidator
  • Object
show all
Defined in:
lib/gitlab/config/entry/validators.rb

Direct Known Subclasses

NestedArrayOfStringsValidator

Instance Method Summary collapse

Instance Method Details

#validate_each(record, attribute, value) ⇒ Object


218
219
220
221
222
# File 'lib/gitlab/config/entry/validators.rb', line 218

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