Closed tyler-mitchell closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated |
---|---|---|---|---|
react-ts-form | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Mar 24, 2023 at 4:46AM (UTC) |
@iway1 we could really use this metadata as well! any chance you could review?
@scamden yep will check it out in a bit
@iway1
Glad to contribute 🔥
Introduces hooks which allow access to a field's schema data from within a custom form component via hooks.
Use cases:
*
based on whether or not the fieldisOptional
maxLength
minLength
defined originally in the schemaThis pull request adds capabilities referenced in #71
useFieldInfo
Returns schema-related information for any field.
Additionally, this hook includes
label
andplaceholder
which is currently gotten via theuseDescription
hook.useStringFieldInfo
Returns schema-related information for a ZodString field
useNumberFieldInfo
Returns schema-related information for a ZodNumber field