Class: Gitlab::Config::Entry::Validators::BooleanValidator

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



145
146
147
148
149
# File 'lib/gitlab/config/entry/validators.rb', line 145

def validate_each(record, attribute, value)
  unless validate_boolean(value)
    record.errors.add(attribute, 'should be a boolean value')
  end
end