Sha256: ff6594b22ec80c2cf9b2691586cfeaad6e505c7f98feec0d3c07b2d36c2c3ec6
Contents?: true
Size: 539 Bytes
Versions: 3
Compression:
Stored size: 539 Bytes
Contents
require 'json-schema/attribute' require 'uri' module JSON class Schema class FormatAttribute < Attribute def self.validate(current_schema, data, fragments, processor, validator, options = {}) if self.data_valid_for_type?(data, current_schema.schema['type']) format = current_schema.schema['format'].to_s validator = validator.formats[format] validator.validate(current_schema, data, fragments, processor, validator, options) unless validator.nil? end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
json-schema-2.4.1 | lib/json-schema/attributes/format.rb |
json-schema-2.4.0 | lib/json-schema/attributes/format.rb |
json-schema-2.3.0 | lib/json-schema/attributes/format.rb |