email validation fix
This commit is contained in:
parent
1e178bbb36
commit
cad6f01b08
1 changed files with 1 additions and 1 deletions
|
|
@ -136,7 +136,7 @@ class _RegisterState extends State<Register> {
|
||||||
|
|
||||||
bool validEmail() {
|
bool validEmail() {
|
||||||
String text = emailController.text;
|
String text = emailController.text;
|
||||||
var regex = RegExp(r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$');
|
var regex = RegExp(r'^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$');
|
||||||
return regex.hasMatch(text);
|
return regex.hasMatch(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue