change regex for email addresses
This commit is contained in:
@@ -65,7 +65,8 @@ class _MIHTextFieldState extends State<MIHTextField> {
|
||||
}
|
||||
|
||||
bool isEmailValid(String email) {
|
||||
return RegExp(r'^[\w-\.]+@[a-zA-Z]+\.[a-zA-Z]{2,}$').hasMatch(email);
|
||||
var regex = RegExp(r'^[a-zA-Z0-9]+@[a-zA-Z.-]+\.[a-zA-Z]{2,}$');
|
||||
return regex.hasMatch(email);
|
||||
}
|
||||
|
||||
void _onFocusChange() {
|
||||
|
||||
Reference in New Issue
Block a user