Class: SimpleSchema::ValidatorProperties
- Inherits:
-
Object
- Object
- SimpleSchema::ValidatorProperties
- Defined in:
- lib/simple_schema/validator_properties.rb
Class Method Summary collapse
Class Method Details
.build(data, schema, class_options, options) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/simple_schema/validator_properties.rb', line 3 def self.build(data, schema, , ) return false unless (schema[:type] == :object) begin validator = Validator::new(schema[:properties], ) validator.validate!(data, ) rescue InvalidDataType raise MissingAttribute.new([:path]) end end |