Method: Scimitar::Schema::Attribute#valid_complex_type?
- Defined in:
- app/models/scimitar/schema/attribute.rb
#valid_complex_type?(value) ⇒ Boolean
84 85 86 87 88 89 90 91 92 93 |
# File 'app/models/scimitar/schema/attribute.rb', line 84 def valid_complex_type?(value) if !value.class.respond_to?(:schema) || value.class.schema != complexType.schema errors.add(self.name, 'has to follow the complexType format.') return false end value.class.schema.valid?(value) return true if value.errors.empty? add_errors_from_hash(errors_hash: value.errors.to_hash, prefix: self.name) false end |