Skip to content

Commit 0b99288

Browse files
authored
Improve :failed_attribute value
When this failed_attribute param is parsed, it expects a class name, not an instance name. This will ensure it shows `CustomFormat` instead of `0x00009783abf73>`
1 parent 033e114 commit 0b99288

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/json-schema/attributes/formats/custom.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def validate(current_schema, data, fragments, processor, _validator, options = {
1313
@validation_proc.call data
1414
rescue JSON::Schema::CustomFormatError => e
1515
message = "The property '#{self.class.build_fragment(fragments)}' #{e.message}"
16-
self.class.validation_error(processor, message, fragments, current_schema, self, options[:record_errors])
16+
self.class.validation_error(processor, message, fragments, current_schema, self.class, options[:record_errors])
1717
end
1818
end
1919
end

0 commit comments

Comments
 (0)