Update validation on new application form to skip the save button
This commit is contained in:
parent
ade3f38b5e
commit
637efc5ab5
@ -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.$options.name == 'savebutton') {
|
||||
return true
|
||||
} else {
|
||||
if (!newVal.showValid) {
|
||||
newVal.showError = true
|
||||
}
|
||||
|
||||
return newVal.showValid && previous
|
||||
}
|
||||
}, true)
|
||||
|
||||
this.validate()
|
||||
isValid = this.errors.length == 0 && isValid
|
||||
|
||||
|
@ -76,7 +76,10 @@
|
||||
</div>
|
||||
|
||||
<div class="action-group">
|
||||
<button class="usa-button usa-button-primary" tabindex="0" type="submit">{{ 'portfolios.applications.create_button_text' | translate }}</button>
|
||||
<savebutton
|
||||
text="{{ 'portfolios.applications.create_button_text' | translate }}"
|
||||
:disabled="disabled">
|
||||
</savebutton>
|
||||
</div>
|
||||
</form>
|
||||
</new-application>
|
||||
|
Loading…
x
Reference in New Issue
Block a user