mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-28 17:24:47 -06:00
Fix validation on the table dialogue so the Save button isn't enabled if the name is removed and autovac custom settings are enabled. Fixes #2105
This commit is contained in:
parent
c758920890
commit
3880bc7eb8
@ -734,8 +734,6 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
schema = this.get('schema'),
|
||||
relowner = this.get('relowner');
|
||||
|
||||
this.errorModel.clear();
|
||||
|
||||
// If nothing to validate or VacuumSetting keys then
|
||||
// return from here
|
||||
if ( keys && (keys.length == 0
|
||||
@ -744,6 +742,9 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Have to clear existing validation before initiating current state validation only
|
||||
this.errorModel.clear();
|
||||
|
||||
if (_.isUndefined(name) || _.isNull(name) ||
|
||||
String(name).replace(/^\s+|\s+$/g, '') == '') {
|
||||
msg = '{{ _('Table name cannot be empty.') }}';
|
||||
|
Loading…
Reference in New Issue
Block a user