1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 14:59:41 +02:00

fix wrong error message for secrets (#10073)

This commit is contained in:
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

View file

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