Index: management/univention-management-console-module-ucr/umc/js/ucr.js =================================================================== --- management/univention-management-console-module-ucr/umc/js/ucr.js (Revision 72878) +++ management/univention-management-console-module-ucr/umc/js/ucr.js (Arbeitskopie) @@ -77,7 +77,11 @@ type: TextBox, name: 'key', description: _( 'Name of UCR variable' ), - label: _( 'UCR variable' ) + label: _( 'UCR variable' ), + invalidMessage: _( 'A valid key must contain at least one character and can only contain letters, numerals, and "/", ".", "_", "-".' ), + validator: function (value, constraints) { + return !!value && !/[^a-zA-Z0-9/._-]/.test(value); + } }, { type: TextBox, name: 'value', @@ -105,8 +109,10 @@ label: _( 'Save' ), style: 'float: right', callback: lang.hitch(this, function() { - this._form.save(); - this.hide(); + if (this._form.getWidget('key').isValid()) { + this._form.save(); + this.hide(); + } }) }, { //FIXME: Should be much simpler. The key name should be enough