Skip to content

Refine structure of ConstraintViolation #177

Closed
@yevhenii-nadtochii

Description

@yevhenii-nadtochii
Contributor

Currently, this type has the following nuances to resolve:

  1. string format and repeated string param fields should be removed in favor of TemplateString message.
  2. base.FieldPath field_path is mostly used as field_name. Let's introduce an explicit field_name, and remove the remaining path prefix to field_path_prefix field.
  3. repeated violation field is unnecessary. Currently, we create two violations where a single one actually occurs. If a nested message has an invalid field, a root message always creates an unnecessary violation as a wrapper. We should try to avoid this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @yevhenii-nadtochii

        Issue actions

          Refine structure of `ConstraintViolation` · Issue #177 · SpineEventEngine/validation