# `MishkaBlog.Resources.Validations.NotItsOwnParent`
[🔗](https://github.com/mishka-group/mishka_blog/blob/v0.0.1/lib/mishka_blog/resources/__validations/not_its_own_parent.ex#L5)

Refuses an update that makes a record its own parent: the attribute `:field` may not hold the
record's own id. Any other record, or none, is let through. The refusal is `:message` on `:field`.

    validate {MishkaBlog.Resources.Validations.NotItsOwnParent,
              field: :parent_tag_id,
              message: dgettext_noop("errors", "Tag cannot be its own parent.")}

It reads the id of the record being updated, so it belongs on an update action.

## Options

* `:field` - Required. The attribute holding the parent's id.
* `:message` - Required. The refusal.

---

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