oscklmO
Convex Community2y ago
17 replies
oscklm

Return value validation question?

If i wanna use the return value validation in a function. And say that function returns an array of documents.

How may i define the return value, as the doc. I have a myValidator exported from a validators.ts file that i can use like returns: v.array(videoValidator)

But that ends up erroring, since what im returning is the result of a .collect() so basically what ends up coming through is system fields aswell.

I don't see anything regarding validating returned objects containing system fields in the docs.
Was this page helpful?