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 8fb543a commit 8e3663dCopy full SHA for 8e3663d
packages/vee-validate/src/useForm.ts
@@ -81,8 +81,9 @@ function resolveInitialValues<TValues extends GenericFormValues = GenericFormVal
81
opts?: FormOptions<TValues>
82
): TValues {
83
const providedValues = unref(opts?.initialValues) || {};
84
- if (opts?.validationSchema && isTypedSchema(opts.validationSchema) && isCallable(opts.validationSchema.cast)) {
85
- return deepCopy(opts.validationSchema.cast(providedValues) || {});
+ const schema = unref(opts?.validationSchema);
+ if (schema && isTypedSchema(schema) && isCallable(schema.cast)) {
86
+ return deepCopy(schema.cast(providedValues) || {});
87
}
88
89
return deepCopy(providedValues) as TValues;
0 commit comments