Class: Gitlab::Config::Entry::Validators::ArrayOfHashesValidator

Inherits:
ActiveModel::EachValidator
  • Object
show all
Includes:
LegacyValidationHelpers
Defined in:
lib/gitlab/config/entry/validators.rb

Direct Known Subclasses

NestedArrayOfHashesOrArraysValidator

Instance Method Summary collapse

Instance Method Details

#validate_each(record, attribute, value) ⇒ Object


91
92
93
94
95
# File 'lib/gitlab/config/entry/validators.rb', line 91

def validate_each(record, attribute, value)
  unless validate_array_of_hashes(value)
    record.errors.add(attribute, 'should be an array of hashes')
  end
end