feat: add more page

This commit is contained in:
ReaJason
2025-08-13 23:53:40 +08:00
parent 8c06216e96
commit c925954035
60 changed files with 2403 additions and 284 deletions
+6 -7
View File
@@ -80,15 +80,14 @@ export const useYupValidationResolver = (validationSchema: yup.ObjectSchema<any>
return {
values: {} as FormSchema,
errors: errors.inner.reduce(
(allErrors, currentError) => ({
// biome-ignore lint/performance/noAccumulatingSpread: <explanation>
...allErrors,
[currentError.path as keyof FormSchema]: {
(allErrors, currentError) => {
allErrors[currentError.path as keyof FormSchema] = {
type: currentError.type ?? "validation",
message: currentError.message,
},
}),
{},
};
return allErrors;
},
{} as FieldErrors<FormSchema>,
),
};
}