mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
fix(Form): use parsed value from joi instead of original state (#2587)
This commit is contained in:
@@ -252,10 +252,10 @@ async function validateJoiSchema(
|
||||
schema: JoiSchema
|
||||
): Promise<ValidateReturnSchema<typeof state>> {
|
||||
try {
|
||||
await schema.validateAsync(state, { abortEarly: false })
|
||||
const result = await schema.validateAsync(state, { abortEarly: false })
|
||||
return {
|
||||
errors: null,
|
||||
result: state
|
||||
result
|
||||
}
|
||||
} catch (error) {
|
||||
if (isJoiError(error)) {
|
||||
|
||||
Reference in New Issue
Block a user