Skip to content

Commit

Permalink
Escape the - with \- when it is a char of itself (#20892)
Browse files Browse the repository at this point in the history
fixes #20891

Signed-off-by: stonezdj <stone.zhang@broadcom.com>
  • Loading branch information
stonezdj authored Sep 3, 2024
1 parent 9d11de9 commit a946447
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h3 class="modal-title">{{ 'PROJECT.NEW_PROJECT' | translate }}</h3>
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h3 class="modal-title">{{ headerTitle | translate }}</h3>
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h3 *ngIf="isEditMode" class="modal-title">
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h3 *ngIf="isEditMode" class="modal-title">
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"
Expand Down

0 comments on commit a946447

Please sign in to comment.