Helpers¶
A collection of useful convenience methods.
- class odin.helpers.ValidationErrorCollection[source]¶
Helper collection for collecting validation error messages and generating or raising an exception.
Usage:
errors = ValidationErrorCollection() ... # Perform validation errors.add_message("name", "Value is required") if errors: raise errors.validation_error()
- validation_error() ValidationError [source]¶
Generate an exception based on the validation messages added.