Function useFormValidation
- useFormValidation(state: ChildStateLeafs<ValidationArgs<unknown>>, rules: ValidationArgs<unknown>): {
getFieldErrorMessage: ((fieldPath: string) => string);
isFieldsValid: ComputedRef<boolean>;
isFormValid: (() => boolean);
touchField: ((fieldPath: string) => void);
}
-
Parameters
-
state: ChildStateLeafs<ValidationArgs<unknown>>
-
rules: ValidationArgs<unknown>
Returns {
getFieldErrorMessage: ((fieldPath: string) => string);
isFieldsValid: ComputedRef<boolean>;
isFormValid: (() => boolean);
touchField: ((fieldPath: string) => void);
}
-
getFieldErrorMessage: ((fieldPath: string) => string)
-
- (fieldPath: string): string
-
Returns string
-
isFieldsValid: ComputedRef<boolean>
-
isFormValid: (() => boolean)
-
- (): boolean
-
Returns boolean
-
touchField: ((fieldPath: string) => void)
-
- (fieldPath: string): void
-
Returns void