Skip to content

Commit

Permalink
My first version
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp committed Feb 9, 2019
1 parent 807f9ff commit 1974f0a
Show file tree
Hide file tree
Showing 11 changed files with 1,229 additions and 2,515 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
"extends": ["avidofood"],
"rules": {
"no-param-reassign": 0,
"no-unused-vars": 0
}
};
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ In your script entry point:
```javascript
import Vue from 'vue';
import VeeValidate from 'vee-validate';
import VeeValidateLaravel from 'vee-validate-laravel';
import VeeValidateLaravel from '@pmochine/vee-validate-laravel';

Vue.use(VeeValidate);
Vue.use(VeeValidateLaravel);
Expand Down Expand Up @@ -53,10 +53,14 @@ In Vue classes:
name: this.name
};
axios.post('/example', data).then(res => {
}).catch(err => {
this.$setLaravelValidationErrorsFromResponse(err.response.data);
});
axios.post('/example', data)
.then(res => {})
.catch(err => {
//adds errors to vee-validate errorBag and returns the first error string
let firstError = this.$addLaravelErrors(err.response);
alert(firstError); //it's a string or null
});
}
}
}
Expand Down
50 changes: 0 additions & 50 deletions build.js

This file was deleted.

48 changes: 0 additions & 48 deletions dist/vee-validate-laravel.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/vee-validate-laravel.min.js

This file was deleted.

Loading

0 comments on commit 1974f0a

Please sign in to comment.