mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
fix wrong error message for secrets (#10073)
This commit is contained in:
parent
cfe0d3092d
commit
bb646162d1
1 changed files with 5 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue