email static method
Implementation
static String? email(String? value, {String message = "Enter valid email"}) {
if (value == null || value.isEmpty) return null;
final regex = RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w]{2,4}$');
if (!regex.hasMatch(value)) {
return message;
}
return null;
}