You are here

class Lowercase_Constraint in Password Policy 5

Hierarchy

Expanded class hierarchy of Lowercase_Constraint

1 string reference to 'Lowercase_Constraint'
PasswordPolicyTest::testConstraints in tests/password_policy.test

File

constraints/constraint_lowercase.php, line 5

View source
class Lowercase_Constraint extends Letter_Constraint {
  function _charIsValid($character) {
    return parent::_charIsValid($character) && ctype_lower($character);
  }
  function getDescription() {
    return t('Password must contain the specified minimum number of lowercase letters.');
  }
  function getValidationErrorMessage() {
    return t('Password must contain a minimum of %numChars lowercase %characters.', array(
      '%numChars' => $this->minimumConstraintValue,
      '%characters' => format_plural($this->minimumConstraintValue, t('character'), t('characters')),
    ));
  }

}

Members