Skip to content

Commit b5b6c08

Browse files
committed
Added k8sNameValidator to secret edit dialog
1 parent bba91fa commit b5b6c08

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

webui/src/js/models/k8s-domain-definition.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ define(['knockout', 'utils/observable-properties', 'utils/common-utilities', 'ut
188188
this.serverPodEnvironmentVariables = props.createListProperty(['uid', 'name', 'value']).persistByKey('uid');
189189
this.serverPodEnvironmentVariablesOverrideOtherSettings = props.createProperty(false);
190190

191+
this.validators = {
192+
k8sNameValidator: validationHelper.getK8sNameValidators(),
193+
};
194+
191195
// update the secrets list when the uid changes.
192196
this.uid.observable.subscribe(() => {
193197
this.updateSecretsFromModel();

webui/src/js/views/secret-edit-dialog.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<oj-input-text label-hint="[[labelMapper('secret-name-label')]]"
1414
value="{{newName}}"
1515
required="true"
16+
validators="[[project.k8sDomain.validators.k8sNameValidator]]"
1617
help.instruction="[[labelMapper('secret-name-help')]]">
1718
</oj-input-text>
1819
</oj-form-layout>

0 commit comments

Comments
 (0)