mirror of https://github.com/portainer/portainer
fix wrong error message for secrets (#10073)
parent
cfe0d3092d
commit
bb646162d1
|
@ -4,9 +4,11 @@ class KubernetesFormValidationHelper {
|
|||
static getInvalidKeys(names) {
|
||||
const res = {};
|
||||
_.forEach(names, (name, index) => {
|
||||
const valid = /^[-._a-zA-Z0-9]+$/.test(name);
|
||||
if (!valid) {
|
||||
res[index] = true;
|
||||
if (name) {
|
||||
const valid = /^[-._a-zA-Z0-9]+$/.test(name);
|
||||
if (!valid) {
|
||||
res[index] = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
return res;
|
||||
|
|
Loading…
Reference in New Issue