Merge pull request #348 from Learnware-LAMDA/fix_login_163

fix(frontend): fix email check for login page
This commit is contained in:
zouxiaochuan 2024-01-31 15:31:08 +08:00 committed by GitHub
commit 56da351d58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ const router = useRouter();
const email = useField<string>({
defaultValue: "",
validate: (value) => {
if (!/^[a-z.-_]+@([a-z.-]+\.[a-z]+|localhost)$/i.test(value)) {
if (!/^[a-z.-_]+@([a-z0-9.-]+\.[a-z]+|localhost)$/i.test(value)) {
return t("Login.Error.InvalidEmail");
}
return "";