From 4842d589a638764daf5d3cc365c08361e0c94f13 Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Tue, 11 May 2021 18:21:53 +0530 Subject: [PATCH] Added missing validation for data type. Fixes #6407 --- .../servers/databases/schemas/types/static/js/type.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/static/js/type.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/static/js/type.js index 8f94ec98f..035f31a2a 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/static/js/type.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/static/js/type.js @@ -1032,6 +1032,16 @@ define('pgadmin.node.type', [ } } + // For Nested Table and Varying Array + if(this.get('typtype') == 'N' || this.get('typtype') == 'V') { + if (_.isUndefined(this.get('type')) || _.isNull(this.get('type')) || + String(this.get('type')).replace(/^\s+|\s+$/g, '') == '') { + msg = gettext('Data type cannot be empty.'); + this.errorModel.set('type', msg); + return msg; + } + } + return null; }, // We will disable everything if we are under catalog node