I am aware that the ValidationResult returned by validate() can contain a ValidationError.
Does this library provide a way to turn a ValidationError into an error text that can be shown to the user? Looks like generating such a message is somewhat involved, with ValidationError containing multiple potentially relevant fields, including subErrors. So I rather not reinvent the wheel here.
For my use cases this message does not need to be fancy or particularly user friendly. Something akin to a stack trace would work great and is miles better than just dumping a serialized version of ValidationError.
I am aware that the
ValidationResult
returned byvalidate()
can contain aValidationError
.Does this library provide a way to turn a
ValidationError
into an error text that can be shown to the user? Looks like generating such a message is somewhat involved, withValidationError
containing multiple potentially relevant fields, includingsubErrors
. So I rather not reinvent the wheel here.For my use cases this message does not need to be fancy or particularly user friendly. Something akin to a stack trace would work great and is miles better than just dumping a serialized version of
ValidationError
.