# Array type "empty\_values" cannot remove all empty values

**URL:** <https://forum.elixirforum.com/t/array-type-empty-values-cannot-remove-all-empty-values/63330>\
**Category:** Questions\
**Tags:** ash\
**Created:** [May 5, 2024, 11:31am UTC](https://forum.elixirforum.com/t/array-type-empty-values-cannot-remove-all-empty-values/63330 "2024-05-05T11:31:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![zachdaniel](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/32/31980_2.png) [@zachdaniel](https://forum.elixirforum.com/u/zachdaniel)\
**Post date:** [May 5, 2024, 11:42am UTC](https://forum.elixirforum.com/t/array-type-empty-values-cannot-remove-all-empty-values/63330/2 "2024-05-05T11:42:26Z")

</div>

Honestly, that was added so long ago its hard to say what the original rationale was 😆

1. Ash strings (by default), cast to `nil`.
2. We have the `nil_items?` constraint, which rejects nil values. For us `empty_values` is a separate kind of thing, representing when the entire list is empty.
3. I think what you want is a new constraint, called `remove_nil_items?` that will remove nil items instead of making them an error if they exist.

---

_[View the full topic](https://forum.elixirforum.com/t/array-type-empty-values-cannot-remove-all-empty-values/63330)._
