@iankibetsh/shframework 0.5.7 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/library.js +5 -4
- package/dist/library.mjs +5 -4
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -2153,8 +2153,7 @@ var script$6 = {
|
|
|
2153
2153
|
this.form_status = 3;
|
|
2154
2154
|
if (typeof reason !== 'undefined') {
|
|
2155
2155
|
if (typeof reason.response !== 'undefined') {
|
|
2156
|
-
this.
|
|
2157
|
-
this.setErrors(reason.response);
|
|
2156
|
+
this.setErrors(reason.response, reason.message);
|
|
2158
2157
|
} else {
|
|
2159
2158
|
console.log('catch error');
|
|
2160
2159
|
console.log(reason);
|
|
@@ -2169,10 +2168,12 @@ var script$6 = {
|
|
|
2169
2168
|
this.form_errors[field] = null;
|
|
2170
2169
|
this.form_status = 0;
|
|
2171
2170
|
},
|
|
2172
|
-
setErrors: function (reason) {
|
|
2173
|
-
console.log(reason);
|
|
2171
|
+
setErrors: function (reason, message) {
|
|
2172
|
+
console.log(reason,message);
|
|
2174
2173
|
if (reason.status === 422) { // change this to 422 validation error response as received from laravel
|
|
2175
2174
|
this.form_errors = reason.data.errors;
|
|
2175
|
+
} else {
|
|
2176
|
+
this.errorText = message;
|
|
2176
2177
|
}
|
|
2177
2178
|
},
|
|
2178
2179
|
handleFileUpload: function (key) {
|
package/dist/library.mjs
CHANGED
|
@@ -2141,8 +2141,7 @@ var script$6 = {
|
|
|
2141
2141
|
this.form_status = 3;
|
|
2142
2142
|
if (typeof reason !== 'undefined') {
|
|
2143
2143
|
if (typeof reason.response !== 'undefined') {
|
|
2144
|
-
this.
|
|
2145
|
-
this.setErrors(reason.response);
|
|
2144
|
+
this.setErrors(reason.response, reason.message);
|
|
2146
2145
|
} else {
|
|
2147
2146
|
console.log('catch error');
|
|
2148
2147
|
console.log(reason);
|
|
@@ -2157,10 +2156,12 @@ var script$6 = {
|
|
|
2157
2156
|
this.form_errors[field] = null;
|
|
2158
2157
|
this.form_status = 0;
|
|
2159
2158
|
},
|
|
2160
|
-
setErrors: function (reason) {
|
|
2161
|
-
console.log(reason);
|
|
2159
|
+
setErrors: function (reason, message) {
|
|
2160
|
+
console.log(reason,message);
|
|
2162
2161
|
if (reason.status === 422) { // change this to 422 validation error response as received from laravel
|
|
2163
2162
|
this.form_errors = reason.data.errors;
|
|
2163
|
+
} else {
|
|
2164
|
+
this.errorText = message;
|
|
2164
2165
|
}
|
|
2165
2166
|
},
|
|
2166
2167
|
handleFileUpload: function (key) {
|