Skip to content

Commit 1974f0a

Browse files
author
Philipp
committed
My first version
1 parent 807f9ff commit 1974f0a

File tree

11 files changed

+1229
-2515
lines changed

11 files changed

+1229
-2515
lines changed

.babelrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
"extends": ["avidofood"],
3+
"rules": {
4+
"no-param-reassign": 0,
5+
"no-unused-vars": 0
6+
}
7+
};

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ In your script entry point:
88
```javascript
99
import Vue from 'vue';
1010
import VeeValidate from 'vee-validate';
11-
import VeeValidateLaravel from 'vee-validate-laravel';
11+
import VeeValidateLaravel from '@pmochine/vee-validate-laravel';
1212

1313
Vue.use(VeeValidate);
1414
Vue.use(VeeValidateLaravel);
@@ -53,10 +53,14 @@ In Vue classes:
5353
name: this.name
5454
};
5555
56-
axios.post('/example', data).then(res => {
57-
}).catch(err => {
58-
this.$setLaravelValidationErrorsFromResponse(err.response.data);
59-
});
56+
axios.post('/example', data)
57+
.then(res => {})
58+
.catch(err => {
59+
//adds errors to vee-validate errorBag and returns the first error string
60+
let firstError = this.$addLaravelErrors(err.response);
61+
62+
alert(firstError); //it's a string or null
63+
});
6064
}
6165
}
6266
}

build.js

Lines changed: 0 additions & 50 deletions
This file was deleted.

dist/vee-validate-laravel.js

Lines changed: 0 additions & 48 deletions
This file was deleted.

dist/vee-validate-laravel.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)