Skip to content

Commit

Permalink
docs(migration_guide): add change of regex helper method signature (v…
Browse files Browse the repository at this point in the history
  • Loading branch information
dargmuesli authored Sep 12, 2022
1 parent 791f698 commit 64b0d9d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/docs/src/migration_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,23 @@ export default {
}
```

## Change of regex helper method signature

The first string parameter of the regex helper method signature has been removed.
It used to be required for registering the name of the validator for the withParams function, which is no longer a necessity.

### Migration strategy

Simply remove the first parameter and keep only the regex:

```js
// v0.x
const regexSlug = helpers.regex('slug', /^[-A-Za-z0-9]+$/)

// v2.x
const regexSlug = helpers.regex(/^[-A-Za-z0-9]+$/)
```

## Validation groups change

Validation groups have been moved to the `$validationGroups` config.
Expand Down

0 comments on commit 64b0d9d

Please sign in to comment.