# `AshScim.Verifiers.Relationship`
[🔗](https://github.com/ash-project/ash_scim/blob/main/lib/ash_scim/verifiers/relationship.ex#L5)

Compile-time verifier for `multivalued` declarations.

For relationship-backed multivalueds:

  * the relationship exists on the resource
  * it is a `has_many`
  * every sub-`map` whose `:attribute` is set names a real attribute on
    the related resource

For multivalueds with `mirror_primary_to:`:

  * `mirror_primary_to` requires `relationship:` to also be set
  * the named attribute exists on the parent resource
  * the multivalued declares a sub-`map` for the SCIM `:value`
    sub-attribute (since that's what gets mirrored)

This catches typos at compile time so users don't get cryptic runtime
errors from `manage_relationship` or the encoder's load step.

---

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