Sha256: 37d22de0bfa80205de28b2686eee0748dd2b325d317b683cc9bd5d4a94e78f8e
Contents?: true
Size: 493 Bytes
Versions: 15
Compression:
Stored size: 493 Bytes
Contents
module JSON class Schema class MinItemsAttribute < Attribute def self.validate(current_schema, data, fragments, validator, options = {}) if data.is_a?(Array) && (data.compact.size < current_schema.schema['minItems']) message = "The property '#{build_fragment(fragments)}' did not contain a minimum number of items #{current_schema.schema['minItems']}" raise ValidationError.new(message, fragments, current_schema) end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems