jamalsoueidan
jamalsoueidan6mo ago

v.record() to only require some properties

I think it would be great to have v.record() to only require some properties, and not all when receiving data from webhook, right now all the properties require to be typed if we need to validate the data. 🍉
2 Replies
ballingt
ballingt6mo ago
v.record() is coming but it's going to be more like a TypeScript Record<string, T> where none of the properties are required. What you want sounds like a loose validator / partial schema validation, that's something on the wishlist.
jamalsoueidan
jamalsoueidanOP6mo ago
exactly! Thank you

Did you find this page helpful?