Sha256: 81f70e4712376d79d3ccdc70f6f985db9fc8d3ee86ebf797c31e3838da31ffdc
Contents?: true
Size: 701 Bytes
Versions: 12
Compression:
Stored size: 701 Bytes
Contents
module JSON class Schema class MaximumInclusiveAttribute < Attribute def self.validate(current_schema, data, fragments, validator, options = {}) if data.is_a?(Numeric) if (current_schema.schema['maximumCanEqual'] == false ? data >= current_schema.schema['maximum'] : data > current_schema.schema['maximum']) message = "The property '#{build_fragment(fragments)}' did not have a maximum value of #{current_schema.schema['maximum']}, " message += current_schema.schema['exclusiveMaximum'] ? 'exclusively' : 'inclusively' raise ValidationError.new(message, fragments, current_schema) end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems