# `PB.Validate.Violation`
[🔗](https://github.com/hansihe/pb_ex/blob/v0.2.0/pb_validate/lib/pb/validate/violation.ex#L1)

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.

# `field_path`

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

A path to a field or rule, as `buf.validate.FieldPath`: a map with
`:elements`, each describing one step.

# `t`

```elixir
@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
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
