password static method
FormFieldValidator that requires the field's value to be a valid password.
Parameters:
minLengthThe minimum length of the password (default: 8).maxLengthThe maximum length of the password (default: 32).minUppercaseCountThe minimum number of uppercase characters (default: 1).minLowercaseCountThe minimum number of lowercase characters (default: 1).minNumberCountThe minimum number of numeric characters (default: 1).minSpecialCharCountThe minimum number of special characters (default: 1).errorTextThe error message when the password is invalid.checkNullOrEmptyWhether to check for null or empty values.
Implementation
static FormFieldValidator<String> password({
int minLength = 8,
int maxLength = 32,
int minUppercaseCount = 1,
int minLowercaseCount = 1,
int minNumberCount = 1,
int minSpecialCharCount = 1,
String? errorText,
bool checkNullOrEmpty = true,
}) => PasswordValidator(
minLength: minLength,
maxLength: maxLength,
minUppercaseCount: minUppercaseCount,
minLowercaseCount: minLowercaseCount,
minNumberCount: minNumberCount,
minSpecialCharCount: minSpecialCharCount,
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;