strongPassword static method

String? Function(String?) strongPassword({
  1. int minLength = 8,
  2. int minLowercase = 1,
  3. int minUppercase = 1,
  4. int minNumbers = 1,
  5. int minSymbols = 1,
  6. String errorMessage = 'Password is not strong enough',
})

Ensures the string is a strong password.

Implementation

static String? Function(String?) strongPassword({
  int minLength = 8,
  int minLowercase = 1,
  int minUppercase = 1,
  int minNumbers = 1,
  int minSymbols = 1,
  String errorMessage = 'Password is not strong enough',
}) {
  return _build(
    errorMessage,
    (v) => v.isStrongPassword(
      minLength: minLength,
      minLowercase: minLowercase,
      minUppercase: minUppercase,
      minNumbers: minNumbers,
      minSymbols: minSymbols,
    ),
  );
}