PB.Validate.Violation (PB v0.1.0)

Copy Markdown View Source

Rich application-facing protovalidate violation.

This struct may contain more diagnostic information than the canonical buf.validate.Violation wire shape. Use PB.Validate.to_proto_violations/1 when an exact protobuf result is needed.

Summary

Types

field_path()

@type field_path() :: %{elements: [map()]}

t()

@type t() :: %PB.Validate.Violation{
  field: field_path() | nil,
  for_key: boolean() | nil,
  message: String.t() | nil,
  proto_rule: field_path() | nil,
  rule: field_path() | nil,
  rule_id: String.t(),
  source: String.t() | nil
}