Class: Scim::Kit::V2::ComplexAttributeValidator
- Inherits:
-
ActiveModel::Validator
- Object
- ActiveModel::Validator
- Scim::Kit::V2::ComplexAttributeValidator
- Defined in:
- lib/scim/kit/v2/complex_attribute_validator.rb
Overview
Validates a complex attribute
Instance Method Summary collapse
Instance Method Details
#validate(item) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/scim/kit/v2/complex_attribute_validator.rb', line 8 def validate(item) if item._type.multi_valued multi_valued_validation(item) else item.each do |attribute| item.errors.merge!(attribute.errors) unless attribute.valid? end end end |