https://github.com/e200/vuelidate-error-helper
Vuelidate error messages helper
https://github.com/e200/vuelidate-error-helper
error helper message vue vuelidate
Last synced: 5 months ago
JSON representation
Vuelidate error messages helper
- Host: GitHub
- URL: https://github.com/e200/vuelidate-error-helper
- Owner: e200
- Created: 2018-07-09T20:20:25.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T15:16:05.000Z (over 3 years ago)
- Last Synced: 2025-08-30T13:28:12.484Z (10 months ago)
- Topics: error, helper, message, vue, vuelidate
- Language: JavaScript
- Size: 899 KB
- Stars: 6
- Watchers: 0
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Vuelidate Error Helper
Easily get error messages from vuelidate with this helper
## Installation
`npm i vuelidate-error-helper -S`
## How to use
First add the package to your Vue app
```js
import Vue from 'vue'
import Vuelidate from 'vuelidate'
import VuelidateErrorHelper from 'vuelidate-error-helper'
import ptPt from 'vuelidate-error-helper/src/lang/pt-pt'
Vue.use(Vuelidate)
Vue.use(VuelidateErrorHelper, {
lang: ptPt
})
```
```html
import { required } from 'vuelidate/lib/validators'
import validatorMixin from 'vuelidate-error-helper/src/mixin'
export default {
mixins: [validatorMixin],
data() {
return {
name: null
}
},
validations: {
name: {
required
}
}
}
```