email validation fix

This commit is contained in:
2024-11-06 09:11:04 +02:00
parent 0b8141ae2f
commit 1e178bbb36

View File

@@ -262,7 +262,7 @@ class _BusinessDetailsState extends State<BusinessDetails> {
bool validEmail() {
String text = emailController.text;
var regex = RegExp(r'^[a-zA-Z0-9]+@[a-zA-Z.-]+\.[a-zA-Z]{2,}$');
var regex = RegExp(r'^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$');
return regex.hasMatch(text);
}