function password_policy_constraint_length_validate in Password Policy 7
Same name and namespace in other branches
- 6 constraints/constraint_length.inc \password_policy_constraint_length_validate()
Password validation.
1 call to password_policy_constraint_length_validate()
- PasswordPolicyTestCase::testLengthConstraint in tests/
password_policy.test - Test length constraint.
File
- constraints/
constraint_length.inc, line 29 - Password policy constraint callbacks.
Code
function password_policy_constraint_length_validate($password, $constraint, $account) {
$length = drupal_strlen($password);
return $length >= $constraint;
}