mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 10:17:16 +08:00
@ -109,9 +109,10 @@ class SettingsListState extends State<SettingsList> {
|
|||||||
return tr('settings.email.validator.empty');
|
return tr('settings.email.validator.empty');
|
||||||
}
|
}
|
||||||
|
|
||||||
bool emailValid =
|
bool emailValid = RegExp(
|
||||||
RegExp(r"^[a-zA-Z0-9.\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z\-]+")
|
r"^[a-zA-Z0-9.\-!#$%&'*+/=?^_``{|}~]+@[a-zA-Z0-9\-]+\.[a-zA-Z\-]+")
|
||||||
.hasMatch(value);
|
.hasMatch(value);
|
||||||
|
|
||||||
if (!emailValid) {
|
if (!emailValid) {
|
||||||
return tr('settings.email.validator.invalid');
|
return tr('settings.email.validator.invalid');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user