Class: Gitlab::Config::Entry::Validators::KeyValidator

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

Instance Method Summary collapse

Instance Method Details

#validate_each(record, attribute, value) ⇒ Object


185
186
187
188
189
190
191
# File 'lib/gitlab/config/entry/validators.rb', line 185

def validate_each(record, attribute, value)
  if validate_string(value)
    validate_path(record, attribute, value)
  else
    record.errors.add(attribute, 'should be a string or symbol')
  end
end