fix bug with smtp name containing parentheses

This commit is contained in:
Peter Clement 2023-10-26 10:23:51 +01:00
parent b1f05eba42
commit 3eba7990f9
1 changed files with 3 additions and 2 deletions

View File

@ -57,14 +57,15 @@
} }
const getAutomationNameError = name => { const getAutomationNameError = name => {
if (name.length > 0) { if (name !== block.name && block.name.includes(name)) {
if (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
} }}
const startTyping = async () => { const startTyping = async () => {
typing = true typing = true