unique name enforcement for automations
This commit is contained in:
parent
f1802eb41c
commit
635008e173
|
@ -58,11 +58,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const getAutomationNameError = name => {
|
const getAutomationNameError = name => {
|
||||||
|
for (const [key, value] of Object.entries(stepNames)) {
|
||||||
|
if (name === value && key !== block.id) {
|
||||||
|
return "This name already exists, please enter a unique name"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (name !== block.name && name?.length > 0) {
|
if (name !== block.name && name?.length > 0) {
|
||||||
let invalidRoleName = !validRegex.test(name)
|
let invalidRoleName = !validRegex.test(name)
|
||||||
if (invalidRoleName) {
|
if (invalidRoleName) {
|
||||||
return "Please enter a role name consisting of only alphanumeric symbols and underscores"
|
return "Please enter a role name consisting of only alphanumeric symbols and underscores"
|
||||||
}
|
}
|
||||||
|
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -282,7 +282,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function shouldRenderField(value) {
|
function shouldRenderField(value) {
|
||||||
console.log(value)
|
|
||||||
return (
|
return (
|
||||||
value.customType !== "row" &&
|
value.customType !== "row" &&
|
||||||
value.customType !== "code" &&
|
value.customType !== "code" &&
|
||||||
|
|
Loading…
Reference in New Issue