Skip to content

Commit

Permalink
docs: remove unused import and fix code format (#964)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiaking committed Nov 1, 2021
1 parent 7ef5f6a commit 79cc273
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/docs/src/custom_validators.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ own validators. The best way to do this is via the `withMessage` helper.
message.

```js
import { required, helpers, minLength } from '@vuelidate/validators'
import { required, helpers } from '@vuelidate/validators'

const validations = {
name: {
required: helpers.withMessage('This field cannot be empty', required),
required: helpers.withMessage('This field cannot be empty', required)
}
};
}
```

`$message` can also take a function that is reactive to changes in the validator state and model. The `$messages` function receives an object with the
Expand All @@ -198,10 +198,10 @@ const validations = {
$params,
$model
}) => `This field has a value of '${$model}' but must have a min length of ${$params.min} so it is ${$invalid ? 'invalid' : 'valid'}`,
minLength(4),
),
minLength(4)
)
}
};
}
```

## Async validators
Expand Down

0 comments on commit 79cc273

Please sign in to comment.