Sha256: b99dabeb52d37faeb65ad757eeb48af8f7a41e41e2f9630921afbf3738f5cbd6
Contents?: true
Size: 722 Bytes
Versions: 9
Compression:
Stored size: 722 Bytes
Contents
module JSON class Schema class MinimumInclusiveAttribute < Attribute def self.validate(current_schema, data, fragments, validator, options = {}) if data.is_a?(Numeric) if (current_schema.schema['minimumCanEqual'] == false ? data <= current_schema.schema['minimum'] : data < current_schema.schema['minimum']) message = "The property '#{build_fragment(fragments)}' did not have a minimum value of #{current_schema.schema['minimum']}, " message += current_schema.schema['exclusiveMinimum'] ? 'exclusively' : 'inclusively' validation_error(message, fragments, current_schema, self, options[:record_errors]) end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems