# `Artefact.Error.Invalid`
[🔗](https://github.com/diffo-dev/artefactory/blob/v0.2.0/lib/artefact/error/invalid.ex#L4)

Validation rule violations on an `%Artefact{}`.

Returned as `{:error, %Artefact.Error.Invalid{reasons: [...]}}` from
`Artefact.validate/1` and from any operation that received an invalid
input or produced an invalid output. Raised by `Artefact.validate!/1`
and by the `!` variants of the operations.

`:reasons` is a list of human-readable strings, one per rule
violation.

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %Artefact.Error.Invalid{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  path: term(),
  reasons: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

Create an `Elixir.Artefact.Error.Invalid` without raising it.

## Keys

- :reasons

---

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