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



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

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