Sha256: 8817386eda3019ede68ce9e69ecd263380be372114d21e8a250dcdf317abd769
Contents?: true
Size: 512 Bytes
Versions: 16
Compression:
Stored size: 512 Bytes
Contents
require 'json-schema/attribute' module JSON class Schema class FormatAttribute < Attribute def self.validate(current_schema, data, fragments, processor, validator, options = {}) return unless 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
Version data entries
16 entries across 15 versions & 4 rubygems