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

View File

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

View File

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

View File

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