Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

useForm 的 validateField 方法无法使用 #34

Open
yangss3 opened this issue Apr 8, 2021 · 0 comments
Open

useForm 的 validateField 方法无法使用 #34

yangss3 opened this issue Apr 8, 2021 · 0 comments

Comments

@yangss3
Copy link

yangss3 commented Apr 8, 2021

使用useForm 进行表单校验,用validateField方法校验单个字段,报错

const state = reactive({ name: 'xxx' })
const rules = reactive({ name: [{ required: true }] })
const { validateField } = useForm(state, rules)

// 报错
validateField('name')

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant