mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 15:01:46 +01:00
fix(Form)!: include nested state in submit data (#3028)
This commit is contained in:
@@ -8,7 +8,7 @@ import type { GetObjectField } from './utils'
|
||||
import type { Struct as SuperstructSchema } from 'superstruct'
|
||||
|
||||
export interface Form<T> {
|
||||
validate (opts?: { name: string | string[], silent?: false, nested?: boolean }): Promise<T | false>
|
||||
validate (opts?: { name?: string | string[], silent?: boolean, nested?: boolean, transform?: boolean }): Promise<T | false>
|
||||
clear (path?: string): void
|
||||
errors: Ref<FormError[]>
|
||||
setErrors (errs: FormError[], path?: string): void
|
||||
@@ -95,7 +95,7 @@ export class FormValidationException extends Error {
|
||||
errors: FormErrorWithId[]
|
||||
children?: FormValidationException[]
|
||||
|
||||
constructor(formId: string | number, errors: FormErrorWithId[], childErrors: FormValidationException[]) {
|
||||
constructor(formId: string | number, errors: FormErrorWithId[], childErrors?: FormValidationException[]) {
|
||||
super('Form validation exception')
|
||||
this.formId = formId
|
||||
this.errors = errors
|
||||
|
||||
Reference in New Issue
Block a user