Skip to content

Commit 33f61b7

Browse files
Fix typo
1 parent 0006958 commit 33f61b7

File tree

1 file changed

+32
-29
lines changed

1 file changed

+32
-29
lines changed

README.md

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ This package allow to display errors from laravel validation rules
88

99
# Installation
1010

11-
```npm install --save laravel-vue-validator
11+
```
12+
npm install --save laravel-vue-validator
13+
```
1214

13-
import LaravelVueValidator from 'laravel-vue-validator'
15+
```javascript
16+
import LaravelVueValidator from 'laravel-vue-validator'
1417

15-
Vue.use(LaravelVueValidator)
16-
```
18+
Vue.use(LaravelVueValidator)
19+
```
1720

1821
# Usage Example
1922

@@ -33,32 +36,32 @@ To flush errors in a vue component:
3336

3437
# Full Example
3538

36-
```
37-
<template>
38-
<input type='text' v-model='name' />
39-
<!--
40-
error do not need v-if,
41-
its content is displayed only if "name" has error after validation"
42-
-->
43-
<error input="name" />
44-
<button @click="submit">Submit</button>
45-
</template>
46-
<script>
47-
48-
export default {
49-
50-
data(){
51-
return{
52-
name: ''
53-
}
54-
},
55-
56-
methods(){
57-
// Error are displayed if Laravel backend return 422 Http code with name as error
58-
this.$http.post('/submit', {name: this.name});
39+
```html
40+
<template>
41+
<input type='text' v-model='name' />
42+
<!--
43+
error do not need v-if,
44+
its content is displayed only if "name" has error after validation"
45+
-->
46+
<error input="name" />
47+
<button @click="submit">Submit</button>
48+
</template>
49+
<script>
50+
51+
export default {
52+
53+
data(){
54+
return{
55+
name: ''
5956
}
57+
},
6058
59+
methods(){
60+
// Error are displayed if Laravel backend return 422 Http code with name as error
61+
this.$http.post('/submit', {name: this.name});
6162
}
6263
63-
</script>
64-
```
64+
}
65+
66+
</script>
67+
```

0 commit comments

Comments
 (0)