<p>Couldn't you modify the criteria to exclude that entry ?  </p>

<pre><code>id =&gt; "not X"
</code></pre>

CC BY-SA 4.0
2019-03-19T07:24:15.440Z
I want to make the desicion after the criteria's, inside the transformer. Lets say get all Entries from a type but only output those that pass my own validation.
Leonardo
CC BY-SA 4.0
2019-03-18T13:10:01.103Z
2019-03-18T13:10:01.103Z
Eric Chantigny
<p>I would like to exclude some of my entries, via my own validation inside the <code>Transformer</code>, from the api output.</p>

<p>Is there a possibility to move on to the next Entry without outputing anything? Right now im just returning an empty array, but i think it would be cleaner to return nothing.</p>

<craft3><plugin-elementapi>
Element API: Is it possible to ignore/skip an Entry?
# Element API: Is it possible to ignore/skip an Entry?

(Asked by: username_0 on 2019-03-18)

I would like to exclude some of my entries, via my own validation inside the `Transformer`, from the api output.

Is there a possibility to move on to the next Entry without outputing anything? Right now im just returning an empty array, but i think it would be cleaner to return nothing.

**Tags:** craft3, plugin-elementapi

---

## 1 answers

### Answer by username_1 on 2019-03-18. Score: 1

Couldn't you modify the criteria to exclude that entry ?  
id => "not X"

> **Comments:**
> **username_0**: I want to make the desicion after the criteria's, inside the transformer. Lets say get all Entries from a type but only output those that pass my own validation.  

---

