mirror of
https://github.com/madari-media/madari-oss.git
synced 2026-01-11 22:40:23 +00:00
Merge pull request #62 from yxx4c/fix/email-regex-validation
Some checks failed
Build and Deploy / build_windows (push) Has been cancelled
Build and Deploy / build_android (push) Has been cancelled
Build and Deploy / build_ipa (push) Has been cancelled
Build and Deploy / build_linux (push) Has been cancelled
Build and Deploy / build_macos (push) Has been cancelled
Some checks failed
Build and Deploy / build_windows (push) Has been cancelled
Build and Deploy / build_android (push) Has been cancelled
Build and Deploy / build_ipa (push) Has been cancelled
Build and Deploy / build_linux (push) Has been cancelled
Build and Deploy / build_macos (push) Has been cancelled
Fix: Update Email Validation Regex for Improved Accuracy
This commit is contained in:
commit
9397b17e42
3 changed files with 3 additions and 3 deletions
|
|
@ -54,7 +54,7 @@ class _ForgotPasswordPageState extends State<ForgotPasswordPage> {
|
|||
if (value?.isEmpty ?? true) {
|
||||
return 'Please enter your email';
|
||||
}
|
||||
if (!RegExp(r'^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$').hasMatch(value!)) {
|
||||
if (!RegExp(r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$').hasMatch(value!)) {
|
||||
return 'Please enter a valid email';
|
||||
}
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ class _SignInPageState extends State<SignInPage>
|
|||
return 'Please enter your email';
|
||||
}
|
||||
if (!RegExp(
|
||||
r'^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$')
|
||||
r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$')
|
||||
.hasMatch(value!)) {
|
||||
return 'Please enter a valid email';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ class _SignUpPageState extends State<SignUpPage>
|
|||
return 'Please enter your email';
|
||||
}
|
||||
if (!RegExp(
|
||||
r'^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$')
|
||||
r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$')
|
||||
.hasMatch(value!)) {
|
||||
return 'Please enter a valid email';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue