mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
docs(form): update (#2167)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -147,7 +147,8 @@ async function _validate(opts: { name?: string | string[], silent?: boolean, nes
|
||||
errors.value = await getErrors()
|
||||
}
|
||||
|
||||
const childErrors = nestedValidatePromises ? await Promise.all(nestedValidatePromises) : []
|
||||
const childErrors = (await Promise.all(nestedValidatePromises)).filter(val => val)
|
||||
|
||||
if (errors.value.length + childErrors.length > 0) {
|
||||
if (opts.silent) return false
|
||||
throw new FormValidationException(formId, errors.value, childErrors)
|
||||
@@ -173,7 +174,6 @@ async function onSubmit(payload: Event) {
|
||||
errors: error.errors,
|
||||
childrens: error.childrens
|
||||
}
|
||||
|
||||
emits('error', errorEvent)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user