We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0a487a commit 23424e6Copy full SHA for 23424e6
packages/components/src/utils.ts
@@ -820,6 +820,12 @@ export const convertSchemaToZod = (schema: string | object): ICommonObject => {
820
} else {
821
zodObj[sch.property] = z.boolean().describe(sch.description).optional()
822
}
823
+ } else if (sch.type === 'date') {
824
+ if (sch.required) {
825
+ zodObj[sch.property] = z.date({ required_error: `${sch.property} required` }).describe(sch.description)
826
+ } else {
827
+ zodObj[sch.property] = z.date().describe(sch.description).optional()
828
+ }
829
830
831
return zodObj
0 commit comments