# `Ash.Query.Function.RequiredError`
[🔗](https://github.com/ash-project/ash/blob/v3.24.3/lib/ash/query/function/required_error.ex#L5)

Returns the given value when it is present, or a required error when it is nil.

Intended for required-attribute validation. It is usually used via an expression
like `expr(required!(^value, ^attribute))`, where `attribute` is a map or
struct that at least contains `:name` and `:resource`.

# `has_partial_evaluate?`

---

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