# When to and when not to use return validators

DevFeed: [When to and when not to use return validators](<https://devfeed.tech/articles/when-to-and-when-not-to-use-return-validators-81494.md>)

Original publisher: [Read original article](<https://stack.convex.dev/when-to-and-when-not-to-use-return-validators>)

Author: Stack

Published: 2026-02-27T05:25:57Z

Content type: article

Language: en

Sources: [Stack](<https://devfeed.tech/sources/stack.md>)

Topics: [autosave](<https://devfeed.tech/topics/autosave.md>), [Single-page application (SPA)](<https://devfeed.tech/topics/spa.md>)

Tags: [agentic-workflow](<https://devfeed.tech/tags/agentic-workflow.md>), [convex](<https://devfeed.tech/tags/convex.md>), [fundamentals](<https://devfeed.tech/tags/fundamentals.md>), [llms](<https://devfeed.tech/tags/llms.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

## AI overview

The article revises guidance on Convex return validators: use TypeScript types and inference by default, and add a `returns` validator when runtime enforcement of an exact contract is needed. It explains that applying validators everywhere can add verbosity, complicate refactoring, consume tokens in agentic workflows, and increase schema mistakes, while validators remain useful for code generation, OpenAPI contracts, and guarding against unintended data exposure.

## Source excerpt

We're changing our guidance for LLMs on Returns Validators.