From a46f0dc2b7c81067e323f72e104134976b994750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?junh=5Feee=28=EC=9D=B4=EC=A4=80=ED=9D=AC=29?= Date: Fri, 23 Sep 2022 11:36:51 +0900 Subject: [PATCH] =?UTF-8?q?=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85=20?= =?UTF-8?q?=ED=9C=B4=EB=8C=80=ED=8F=B0=EB=B2=88=ED=98=B8=20=EC=96=91?= =?UTF-8?q?=EC=8B=9D=20validation=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/account/register/AccountRegisterForm.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/account/register/AccountRegisterForm.js b/src/components/account/register/AccountRegisterForm.js index c427e33e..c710a20c 100644 --- a/src/components/account/register/AccountRegisterForm.js +++ b/src/components/account/register/AccountRegisterForm.js @@ -163,7 +163,7 @@ export const AccountRegisterForm = ({ .string() .required('생년월일을 입력해 주세요.') .matches( - /^(19[0-9][0-9]|20\d{2})(0[0-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])$/, + /^(19[0-9][0-9]|20\d{2})(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])$/, '올바른 생년월일을 입력해 주세요.' ), memberName: yup @@ -172,7 +172,13 @@ export const AccountRegisterForm = ({ .min(3, '최소 2 자 이상 입력 부탁드립니다.') .max(20, '최대 10 자 이하 입력 부탁드립니다.'), email: yup.string().required('이메일을 입력해 주세요.'), - hpno: yup.string().required('휴대폰번호를 입력해 주세요.'), + hpno: yup + .string() + .required('휴대폰번호를 입력해 주세요.') + .matches( + /^(01[0-1])([1-9][0-9]{3})([0-9]{4})$/, + '올바른 휴대폰번호를 입력해 주세요.' + ), cntryCd: yup.string().required('국가를 선택해 주세요.'), clncd: yup.string().required('국가번호를 선택해 주세요.'), userPswd: yup