validateEmailPassword method
Implementation
String? validateEmailPassword(String? value) {
var regex = RegExp(
r"^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{8,}$");
if (regex.hasMatch(value!)) {
return null;
} else {
return "Enter a valid password";
}
}