You are here

function And_Constraint::validate in Password Policy 5

Overrides Constraint::validate

File

constraints/constraint_and.php, line 15

Class

And_Constraint

Code

function validate($plaintext_password, $user = NULL) {
  foreach ($this->constraints as $constraint) {
    if (!$constraint
      ->validate($plaintext_password, $user)) {
      return 0;
    }
  }
  return 1;
}