hasSpecial method

PasswordNode<T> hasSpecial({
  1. String? allowedChars,
  2. String? error,
})

Requires at least one special character such as !@#\$%^&*.

You can restrict which characters are allowed using allowedChars.

Example:

Checkit.string.password().hasSpecial(allowedChars: '!@#');

Implementation

PasswordNode<T> hasSpecial({String? allowedChars, String? error}) {
  _validators.add(
    PasswordValidator.hasSpecial(allowedChars: allowedChars, error: error),
  );

  return this;
}