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) {
|
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;
|
||||||
|
|
Loading…
Reference in New Issue