password static method
Implementation
static String? password(String? value,
{String message = "Password must contain upper, lower, number & symbol"}) {
if (value == null || value.isEmpty) return null;
final regex = RegExp(
r'^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&]).{6,}$');
if (!regex.hasMatch(value)) {
return message;
}
return null;
}