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

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

Instance Method Summary collapse

Instance Method Details

#validate_each(record, attribute, value) ⇒ Object



281
282
283
284
285
# File 'lib/gitlab/config/entry/validators.rb', line 281

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