Skip to content

Commit

Permalink
docs: add $anyError migration strategy.
Browse files Browse the repository at this point in the history
  • Loading branch information
dobromir-hristov committed Sep 25, 2022
1 parent 80d3fdd commit df8aceb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/docs/src/migration_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,19 @@ const rules = {
In the above example, it will create a group called `firstName` that will reflect the state of `number` and `nested.word`.

You can see all your defined groups in the `v$.$validationGroups` property of your vue instance.

## $anyError removal

The `$anyError` helper is removed.

### Migration strategy

Simplest would be to check for `$errors.length` to see if children have an error.

Alternatively you can call `$validate()` and check the resolved value.

```js
if (await this.v$.$validate()) {
// all good, submit to server
}
```

0 comments on commit df8aceb

Please sign in to comment.