1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 07:19: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,9 +4,11 @@ class KubernetesFormValidationHelper {
static getInvalidKeys(names) { static getInvalidKeys(names) {
const res = {}; const res = {};
_.forEach(names, (name, index) => { _.forEach(names, (name, index) => {
const valid = /^[-._a-zA-Z0-9]+$/.test(name); if (name) {
if (!valid) { const valid = /^[-._a-zA-Z0-9]+$/.test(name);
res[index] = true; if (!valid) {
res[index] = true;
}
} }
}); });
return res; return res;