Skip to content

Standard Validation Exception #1152

@BEllis

Description

@BEllis

Currently validators seem to raise a plethora of exceptions of different types and often don't prove much structured info regarding the error.

When a validation exception is raised, I'd expect to be able to determine,

  • data class type
  • data class instance
  • attribute (and/or path?)
  • validiator instance/function
  • value
  • reason for the validation failure or caused by exception

So I can provide useful and structured validation errors to clients of my library/application.

This is partially covered with cattrs and the ClassValidationError exception (and related classes) perhaps porting those exceptions from cattrs or attrs would be a good start?

.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions