Skip to content

Commit

Permalink
Feat: 비밀번호에 한글을 사용할 수 없도록 validation 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ohinhyuk committed Nov 14, 2023
1 parent 73aff8e commit 69682fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/routes/paths.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// ----------------------------------------------------------------------
const DOMAIN = process.env.REACT_APP_HOST_BASE_DOMAIN;

const ROOTS = {
AUTH: '/auth',
DASHBOARD: '/dashboard',
AUTH: `${DOMAIN}/auth`,
DASHBOARD: `${DOMAIN}/dashboard`,
};

// ----------------------------------------------------------------------
Expand Down
5 changes: 4 additions & 1 deletion src/sections/auth/jwt/jwt-login-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ export default function JwtLoginView() {

const LoginSchema = Yup.object().shape({
sid: Yup.string().required('필수 항목 입니다.'),
password: Yup.string().required('필수 항목 입니다.'),
password: Yup.string()
.matches(/^[^\uAC00-\uD7A3]*$/, '비밀번호에 한글을 사용할 수 없습니다.')
.required('필수 항목 입니다.'),
});

const defaultValues = {
Expand Down Expand Up @@ -122,6 +124,7 @@ export default function JwtLoginView() {
</InputAdornment>
),
}}
style={{ imeMode: 'disabled' }}
/>
<Link
to="https://hisnet.handong.edu/"
Expand Down

0 comments on commit 69682fe

Please sign in to comment.