Class: Gitlab::Config::Entry::Validators::ArrayOfIntegersOrIntegerValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- Gitlab::Config::Entry::Validators::ArrayOfIntegersOrIntegerValidator
- Includes:
- LegacyValidationHelpers
- Defined in:
- lib/gitlab/config/entry/validators.rb
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
220 221 222 223 224 |
# File 'lib/gitlab/config/entry/validators.rb', line 220 def validate_each(record, attribute, value) unless validate_integer(value) || validate_array_of_integers(value) record.errors.add(attribute, 'should be an array of integers or an integer') end end |