From f9d4a1f2eb516cc5ad9790ec016727cb3e4b828f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20=C4=90=E1=BB=A9c=20=C4=90=E1=BA=A1t?= Date: Mon, 1 May 2023 16:47:23 +0700 Subject: [PATCH] update validation in signup component --- src/app/components/auth/signup/signup.component.html | 2 +- src/app/constants/Validation.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/auth/signup/signup.component.html b/src/app/components/auth/signup/signup.component.html index 64b23f5..b5b591c 100644 --- a/src/app/components/auth/signup/signup.component.html +++ b/src/app/components/auth/signup/signup.component.html @@ -134,7 +134,7 @@
+ type="tel" placeholder="CMND/CCCD" />
diff --git a/src/app/constants/Validation.ts b/src/app/constants/Validation.ts index b89a5f4..f1f2460 100644 --- a/src/app/constants/Validation.ts +++ b/src/app/constants/Validation.ts @@ -1,7 +1,7 @@ export class Validation { static Regex = { Phone: new RegExp(/^(((\+|)84)|0)([1-9]{1})([0-9]{8})\b/), - IdentifiedCode: new RegExp(/^(\d{9}|\d{12})$/), + IdentifiedCode: new RegExp(/^0\d{8}$|^0\d{11}$|^\d{9}$|^\d{12}$/), Password: new RegExp(/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@$!%*#?&^_-]).{8,}/), }; }