我正在使用vee-validate 4.5.0和Vue version - 3.2.12
我正在尝试在表单中添加无线电验证,但它不起作用。
这是我的示例 ts 代码
myradio: yup.string().oneOf(['value1', 'value2']).required()
使用 TypeScript 验证收音机
这是我的 HTML 代码
<Field v-slot="{ field, errorMessage }" name="myradio">
<VField>
<VControl>
<input id="mints" v-model="events" type="checkbox" value="erc721:mint" />
</VControl>
</VField>
</Field>
代码沙盒链接- https://codesandbox.io/s/vigorous-christian-x0xkx?file=/src/components/HelloWorld.vue