Skip to content

Commit

Permalink
docs: add warning about $v to v$, closes vuelidate#1048
Browse files Browse the repository at this point in the history
  • Loading branch information
dobromir-hristov committed May 1, 2022
1 parent 4c8c218 commit c557655
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions packages/docs/src/migration_guide.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Migration Guide from v0.x

::: danger BREAKING CHANGES
Vuelidate v2.0 is still in early alpha/beta stage. This means the changes listed below might not be final.
Vuelidate v2.0 is still in development. This means the changes listed below might not be final.
:::

## Package name and imports
Expand Down Expand Up @@ -35,7 +35,24 @@ In Vuelidate 0.x you were able to install Vuelidate globally. This is no longer
#### Migration Strategy

1. Remove `Vue.use(Vuelidate)`.
2. Use `useVuelidate()` inside `setup` where needed.
2. Use `useVuelidate()` inside `setup`.

## v$ instead of $v

Vue3 does not allow you to return variables, starting with `$`. Because you are now in control of how your validation variable is called, you can call
it whatever you like. In the Vuelidate docs we reference the Vuelidate instance as `v$`, notice the `$` after the `v`.

```js
export default {
setup () {
return {
v$: useVuelidate()
}
}
}
```

Then in your templates you use `v$` instead.

## Removal of `validationMixin`

Expand Down

0 comments on commit c557655

Please sign in to comment.