Question : flutter validate email
Answered by : john-james
var email = "[email protected]"
bool emailValid = RegExp(r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+").hasMatch(email);
Source : https://stackoverflow.com/questions/16800540/validate-email-address-in-dart | Last Update : Tue, 19 May 20
Question : flutter text form field email validation
Answered by : lazy-llama-5qn7qrusklm7
String validateEmail(String value) { Pattern pattern = r"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]" r"{0,253}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]" r"{0,253}[a-zA-Z0-9])?)*$"; RegExp regex = new RegExp(pattern); if (!regex.hasMatch(value) || value == null) return 'Enter a valid email address'; else return null; }
Source : https://stackoverflow.com/questions/63292839/how-to-validate-email-in-a-textformfield | Last Update : Thu, 31 Dec 20
Question : flutter check email format
Answered by : angry-aardvark-b0eve7fellnh
^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?)*$
Source : https://stackoverflow.com/questions/16800540/validate-email-address-in-dart | Last Update : Wed, 23 Jun 21