We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I wanted to migrate vuelidate 0.x to 2.x and use options API syntax from example
import { useVuelidate } from '@vuelidate/core' export default { name: 'UsersPage', data: () => ({ form: { name: '', email: '' } }), setup: () => ({ v$: useVuelidate() }), validations () { return { form: { name: { required }, email: { required, email } } } } }
rendered object in dom:
but for some reason useVuelidate doesnt use data and validations, v$ object doesnt contains validations. When i tried composition API example it works
import { reactive } from 'vue' // or '@vue/composition-api' in Vue 2.x import { useVuelidate } from '@vuelidate/core' import { email, required } from '@vuelidate/validators' export default { setup () { const state = reactive({ name: '', emailAddress: '' }) const rules = { name: { required }, emailAddress: { required, email } } const v$ = useVuelidate(rules, state) return { state, v$ } } }
versions: vue@2.7.16 @vuelidate/core@2.0.3 @vuelidate/validators@2.0.4
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I wanted to migrate vuelidate 0.x to 2.x and use options API syntax from example
rendered object in dom:
but for some reason useVuelidate doesnt use data and validations, v$ object doesnt contains validations. When i tried composition API example it works
rendered object in dom:
versions:
vue@2.7.16
@vuelidate/core@2.0.3
@vuelidate/validators@2.0.4
The text was updated successfully, but these errors were encountered: