Sha256: 1a1c1d4740f847560074c715adb25a2f9344de0a19ba2e2385c0368a1bfcb4bc
Contents?: true
Size: 727 Bytes
Versions: 26
Compression:
Stored size: 727 Bytes
Contents
module JSON class Schema class MaximumAttribute < Attribute def self.validate(current_schema, data, fragments, processor, validator, options = {}) if data.is_a?(Numeric) if (current_schema.schema['exclusiveMaximum'] ? 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' validation_error(processor, message, fragments, current_schema, self, options[:record_errors]) end end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems