Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个自定义复选框
<checkbox v-model="form.terms_accepted" />
真/假值切换正常
{ "first_name": "", "last_name": "", "username": "", "email": "", "terms_accepted": true }
如何验证真实值?
目前我的验证规则是。
terms_accepted: { required },
您可以使用一个简单的功能:
terms_accepted: { checked: value => value === true }