TF-1677: Support validation email for something@localhost case

(cherry picked from commit e74208941e8e5a2480bb444eca6b462bc576eb94)
This commit is contained in:
HuyNguyen
2023-04-26 14:36:25 +07:00
committed by Dat Vu
parent 136a40b0e3
commit 1d6b8a13bd
3 changed files with 8 additions and 2 deletions
+4
View File
@@ -32,4 +32,8 @@ class AppUtils {
static bool isDirectionRTL(BuildContext context) {
return intl.Bidi.isRtlLanguage(Localizations.localeOf(context).languageCode);
}
static bool isEmailLocalhost(String email) {
return RegExp(r'^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@localhost$').hasMatch(email);
}
}