=> [{:schema=>#<Addressable::URI:0x3ffe4475df78 URI:https://example.com/schema.json>,
:fragment=>"#/",
:message=>"The root object did not contain a required property of 'title'",
:failed_attribute=>"Required"}]
I'm using the errors_as_objects: true option, and was hoping that this would give me "title" somewhere as a value, which would make it easier to work with the errors. With the current data, I need to manually construct a regex to match title in the :message string, which is pretty ugly.
I will work on a PR to add this as a new :failed_property field.
I'm using the
errors_as_objects: true
option, and was hoping that this would give me "title" somewhere as a value, which would make it easier to work with the errors. With the current data, I need to manually construct a regex to matchtitle
in the:message
string, which is pretty ugly.I will work on a PR to add this as a new
:failed_property
field.