convex-js icon indicating copy to clipboard operation
convex-js copied to clipboard

add required method to validators with objects getting deepRequired o…

Open gary-ix opened this issue 2 weeks ago • 0 comments

Add required method to validators. Convex validator objects get required & additionally get deepRequired to recursively make all fields in the object required.

This PR was done alongside https://github.com/get-convex/convex-helpers/pull/848. We use zod as our source of truth and then derive convex validators from them. We try to keep everything required in in validators and only make things optional when editing table definitions during migrations.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

gary-ix avatar Nov 16 '25 19:11 gary-ix