Skip to content

Improve diagnostics in validation error messages #155

@alexander-yevsyukov

Description

@alexander-yevsyukov

We need to review the error messages that are set as default by Policy classes in the validation module. An error message in its default syntax should be more helpful and tell not only about the fact and nature of the error, but give:

  1. A field name or a combination of fields that are in error. Message-wide validation options like required_field may involve more than one field.
  2. A value of a field or a combination of values that produce an error. Now some policies, like PatternPolicy simply say "String should match regex.". Which string? I what field? Which regex? We need to be more helpful in cases like this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions