File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @pmochine/vee-validate-laravel" ,
3- "version" : " 1.0.1 " ,
3+ "version" : " 1.0.2 " ,
44 "description" : " Adds simple laravel form validation support to vee-validate" ,
55 "main" : " src/vee-validate-laravel.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change 1-
2-
31const Plugin = {
42 install ( Vue , options = { } ) {
53 // adding an instance method
@@ -27,16 +25,16 @@ function addToErrorBag(errorResponse) {
2725 // check if errors exist
2826 if ( ! hasProperty ( errorResponse . data , 'errors' ) ) return null ;
2927
30- return loopThroughErrors ( errorResponse . data . errors ) ;
28+ return loopThroughErrors . call ( this , errorResponse . data . errors ) ;
3129}
3230
33- function hasProperty ( obj , key ) {
31+ const hasProperty = ( obj , key ) => {
3432 if ( ! obj ) return false ;
3533
3634 const has = Object . prototype . hasOwnProperty ;
3735
3836 return has . call ( obj , key ) ;
39- }
37+ } ;
4038
4139function loopThroughErrors ( errors ) {
4240 let firstError = '' ;
You can’t perform that action at this time.
0 commit comments