fix wrong error message for secrets (#10073)

pull/10086/head
Prabhat Khera 2023-08-21 08:05:57 +12:00 committed by GitHub
parent cfe0d3092d
commit bb646162d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -4,10 +4,12 @@ class KubernetesFormValidationHelper {
static getInvalidKeys(names) {
const res = {};
_.forEach(names, (name, index) => {
if (name) {
const valid = /^[-._a-zA-Z0-9]+$/.test(name);
if (!valid) {
res[index] = true;
}
}
});
return res;
}