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



103
104
105
106
107
# File 'lib/gitlab/config/entry/validators.rb', line 103

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