Skip to content

Commit 741e106

Browse files
Update README.md
1 parent abc8d8a commit 741e106

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,27 @@
1+
# Laravel Vue Validator
12

3+
This package allow to display errors from laravel validation rules
4+
5+
! This package nwork with vue-resource !
6+
7+
# Installation
8+
9+
`npm install --save laravel-vue-validator`
10+
11+
`import LaravelVueValidator from 'laravel-vue-validator'`
12+
13+
`Vue.use(LaravelVueValidator)`
14+
15+
# Usage Example
16+
17+
If you have in your laravel validation rule :
18+
19+
`'name' => 'required|min:2|max:20'`
20+
21+
You can display the error using in vue :
22+
23+
`<error input="name" />`
24+
25+
To flush errors in a vue component:
26+
27+
`this.$errors.flush()`

0 commit comments

Comments
 (0)