diff --git a/src/containers/account/mypage/AccountMypageContainer.js b/src/containers/account/mypage/AccountMypageContainer.js index 56c97e9..caead3f 100644 --- a/src/containers/account/mypage/AccountMypageContainer.js +++ b/src/containers/account/mypage/AccountMypageContainer.js @@ -300,13 +300,23 @@ const AccountMypageContainer = () => { }; //업데이트 const handlerUpdate = () => { + const reg_email = /^([0-9a-zA-Z_\.-]+)@([0-9a-zA-Z_-]+)(\.[0-9a-zA-Z_-]+){1,2}$/; const param = { cstmrSno: user.cstmrSno, email: userInfo.email, updateUserId: userInfo.userId, hpno: okcheck }; - dispatch(userupdateAction.request(param)); + if (!reg_email.test(param.email)) { + setModal({ + isOpen: true, + title: '필수값 입력 오류', + desc: '이메일 형식을 다시 확인해 주세요.', + color: 'danger' + }); + } else { + dispatch(userupdateAction.request(param)); + } }; const handlerTest = () => { @@ -315,18 +325,12 @@ const AccountMypageContainer = () => { title: '탈퇴 확인', desc: '정말로 탈퇴 하시겠습니까?' }); - + }; const waitwait = () => { dispatch(userDeleteAction.request(user.cstmrSno)); - // setModal({ - // isOpen: true, - // title: '탈퇴 확인', - // desc: '탈퇴가 완료되었습니다.', - // color: 'primary' - // }); - // return; + }; return (