mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-19 14:31:47 +01:00
fix(Form)!: resolve async validation in yup & issue directly mutate state (#2702)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -72,7 +72,7 @@ async function validateYupSchema(
|
||||
schema: YupObjectSchema<any>
|
||||
): Promise<ValidateReturnSchema<typeof state>> {
|
||||
try {
|
||||
const result = schema.validateSync(state, { abortEarly: false })
|
||||
const result = await schema.validate(state, { abortEarly: false })
|
||||
return {
|
||||
errors: null,
|
||||
result
|
||||
|
||||
Reference in New Issue
Block a user