mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-13 00:21:59 -05:00
Do proper validation in the server panel.
This commit is contained in:
1 parent
4feea580aa
commit
eab12f21af
1 file changed
+3
-4
@@ -201,13 +201,12 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
errmsg;
|
||||
|
||||
if (!this.isNew() && 'id' in this.sessAttrs) {
|
||||
var msg = '{{ _('Id can not be changed!') }}';
|
||||
err['id'] = msg;
|
||||
errmsg = msg;
|
||||
err['id'] = '{{ _('Id can not be changed!') }}';;
|
||||
errmsg = err['id'];
|
||||
}
|
||||
if (_.isUndefined(this.get('name')) || String(this.get('name')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['name'] = '{{ _('Name can be empty!') }}';
|
||||
errmsg = errmsg || msg;
|
||||
errmsg = errmsg || err['name'];
|
||||
}
|
||||
this.errorModel.set(err);
|
||||
|
||||
|
||||
Reference in new issue
Block a user