From a946447cad5c1ac0b01623fdbe0a16a6c812558e Mon Sep 17 00:00:00 2001 From: "stonezdj(Daojun Zhang)" Date: Tue, 3 Sep 2024 10:30:18 +0800 Subject: [PATCH] Escape the - with \- when it is a char of itself (#20892) fixes #20891 Signed-off-by: stonezdj --- .../projects/create-project/create-project.component.html | 2 +- .../create-edit-rule/create-edit-rule.component.html | 2 +- .../system-robot-accounts/new-robot/new-robot.component.html | 2 +- .../project/robot-account/add-robot/add-robot.component.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/portal/src/app/base/left-side-nav/projects/create-project/create-project.component.html b/src/portal/src/app/base/left-side-nav/projects/create-project/create-project.component.html index 51f28e20ab6..e09a4bd6935 100644 --- a/src/portal/src/app/base/left-side-nav/projects/create-project/create-project.component.html +++ b/src/portal/src/app/base/left-side-nav/projects/create-project/create-project.component.html @@ -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" /> {{ headerTitle | translate }} 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" diff --git a/src/portal/src/app/base/left-side-nav/system-robot-accounts/new-robot/new-robot.component.html b/src/portal/src/app/base/left-side-nav/system-robot-accounts/new-robot/new-robot.component.html index a3cb1a986f8..0112e887e5a 100644 --- a/src/portal/src/app/base/left-side-nav/system-robot-accounts/new-robot/new-robot.component.html +++ b/src/portal/src/app/base/left-side-nav/system-robot-accounts/new-robot/new-robot.component.html @@ -70,7 +70,7 @@