Update validation on new application form to skip the save button

This commit is contained in:
leigh-mil
2019-04-02 15:05:42 -04:00
parent ade3f38b5e
commit 637efc5ab5
2 changed files with 12 additions and 6 deletions

View File

@@ -112,13 +112,16 @@ export default {
validateAndOpenModal: function() {
let isValid = this.$children.reduce((previous, newVal) => {
// display textInput error if it is not valid
if (!newVal.showValid) {
newVal.showError = true
if (newVal.$options.name == 'savebutton') {
return true
} else {
if (!newVal.showValid) {
newVal.showError = true
}
return newVal.showValid && previous
}
return newVal.showValid && previous
}, true)
this.validate()
isValid = this.errors.length == 0 && isValid