You are here

public function PasswordPolicyValidatorInterface::validatePassword in Password Policy 8.3

Validates the given password.

Parameters

string $password: The new password.

\Drupal\user\UserInterface $user: The current user object.

array $edited_user_roles: An optional array containing the edited user roles.

Return value

bool True when the password is valid, else false.

1 method overrides PasswordPolicyValidatorInterface::validatePassword()
PasswordPolicyValidator::validatePassword in src/PasswordPolicyValidator.php
Validates the given password.

File

src/PasswordPolicyValidatorInterface.php, line 27

Class

PasswordPolicyValidatorInterface
Interface PasswordPolicyValidatorInterface.

Namespace

Drupal\password_policy

Code

public function validatePassword(string $password, UserInterface $user, array $edited_user_roles = []) : bool;