Skip to content

Commit

Permalink
save query: make sure form is valid before submitting
Browse files Browse the repository at this point in the history
  • Loading branch information
RFSH committed Aug 24, 2021
1 parent 552da9b commit 57091b6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,12 @@
vm.form = params.rowData;

vm.submit = function () {
if (vm.form.$invalid) {
AlertsService.addAlert('Sorry, the data could not be submitted because there are errors on the form. Please check all fields and try again.', 'error');
vm.form.$setSubmitted();
return;
}

var row = vm.savedQueryForm.rows[0]

// set id based on hash of `facets` columns
Expand Down

0 comments on commit 57091b6

Please sign in to comment.