Fixes to date validation logic in item submission form.
This commit is contained in:
parent
b12849abde
commit
3e986f0ccd
|
@ -72,10 +72,7 @@
|
||||||
|
|
||||||
if (dateISO == false) {
|
if (dateISO == false) {
|
||||||
|
|
||||||
if ( !this.isOnItemSubmissionForm )
|
|
||||||
this.dateValue = $event.target.value; // Keep wrong version in the input so user can fix it
|
this.dateValue = $event.target.value; // Keep wrong version in the input so user can fix it
|
||||||
else
|
|
||||||
this.$emit('update:value', this.dateValue) // On item submission we send the errored version here to allow the server to return the correct format.
|
|
||||||
|
|
||||||
this.isInvalidDate = true;
|
this.isInvalidDate = true;
|
||||||
|
|
||||||
|
|
|
@ -407,8 +407,8 @@ export const finishItemSubmission = ({ commit }, { itemSubmission, fakeItemId })
|
||||||
resolve( res.data );
|
resolve( res.data );
|
||||||
}).catch( error => {
|
}).catch( error => {
|
||||||
reject({
|
reject({
|
||||||
errors: error.response.data.errors,
|
errors: error.error.response.data.errors,
|
||||||
error_message: error.response.data.error_message
|
error_message: error.error.response.data.error_message
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue