diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-13 21:12:17 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-13 21:12:30 +0900 |
| commit | fdfd372feb039b5dee16c40aa49e50aeaf685809 (patch) | |
| tree | c8c9267eb1e11afd8e48885b4b7b30f9a53b78b0 /frontend | |
| parent | 5a4de49ea8a3f06568fed7863b5085750b94a149 (diff) | |
| download | phperkaigi-2025-albatross-fdfd372feb039b5dee16c40aa49e50aeaf685809.tar.gz phperkaigi-2025-albatross-fdfd372feb039b5dee16c40aa49e50aeaf685809.tar.zst phperkaigi-2025-albatross-fdfd372feb039b5dee16c40aa49e50aeaf685809.zip | |
feat: disallow login with email address
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/app/routes/login.tsx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/frontend/app/routes/login.tsx b/frontend/app/routes/login.tsx index b1249e0..6d76e84 100644 --- a/frontend/app/routes/login.tsx +++ b/frontend/app/routes/login.tsx @@ -35,6 +35,18 @@ export async function action({ request }: ActionFunctionArgs) { { status: 400 }, ); } + if (username.includes("@")) { + return json( + { + message: "ユーザー名が誤っています", + errors: { + username: "メールアドレスではなくユーザー名を入力してください", + password: undefined, + }, + }, + { status: 400 }, + ); + } try { await login(request); |
