convex-js
convex-js copied to clipboard
add required method to validators with objects getting deepRequired o…
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.