Escape the - with \- when it is a char of itself (#20892)

fixes #20891

Signed-off-by: stonezdj <stone.zhang@broadcom.com>
This commit is contained in:
stonezdj(Daojun Zhang) 2024-09-03 10:30:18 +08:00 committed by GitHub
parent 9d11de9706
commit a946447cad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@
name="create_project_name"
class="clr-input input-width"
required
pattern="^[a-z0-9]+(?:[._-][a-z0-9]+)*$"
pattern="^[a-z0-9]+(?:[._\-][a-z0-9]+)*$"
#projectName
autocomplete="off" />
<clr-icon

View File

@ -26,7 +26,7 @@
type="text"
id="ruleName"
size="35"
pattern="^[a-z0-9]+(?:[._-][a-z0-9]+)*$"
pattern="^[a-z0-9]+(?:[._\-][a-z0-9]+)*$"
required
maxlength="255"
formControlName="name"

View File

@ -70,7 +70,7 @@
id="name"
[(ngModel)]="systemRobot.name"
required
pattern="^[a-z0-9]+(?:[._-][a-z0-9]+)*$"
pattern="^[a-z0-9]+(?:[._\-][a-z0-9]+)*$"
maxLengthExt="255"
autocomplete="off"
size="30"

View File

@ -73,7 +73,7 @@
id="name"
[(ngModel)]="robot.name"
required
pattern="^[a-z0-9]+(?:[._-][a-z0-9]+)*$"
pattern="^[a-z0-9]+(?:[._\-][a-z0-9]+)*$"
maxLengthExt="255"
autocomplete="off"
size="30"