Skip to content

Commit

Permalink
メールアドレスとパスワードの正規表現を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
tmikada committed Mar 24, 2024
1 parent 007b5a0 commit 066ce92
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions workspaces/admin/src/pages/AuthPage/internal/LoginContent.tsx
Expand Up @@ -23,14 +23,16 @@ export const LoginContent: React.FC = () => {
.required('メールアドレスを入力してください')
.test({
message: 'メールアドレスには @ を含めてください',
test: (v) => /^(?:[^@]*){12,}$/v.test(v) === false,
// test: (v) => /^(?:[^@]*){12,}$/v.test(v) === false,
test: (v) => /@/v.test(v),
}),
password: yup
.string()
.required('パスワードを入力してください')
.test({
message: 'パスワードには記号を含めてください',
test: (v) => /^(?:[^\P{Letter}&&\P{Number}]*){24,}$/v.test(v) === false,
// test: (v) => /^(?:[^\P{Letter}&&\P{Number}]*){24,}$/v.test(v) === false,
test: (v) => /[^\w\s]/.test(v),
}),
}),
});
Expand Down

0 comments on commit 066ce92

Please sign in to comment.