class Length_Constraint in Password Policy 5
Hierarchy
- class \Constraint
- class \Character_Constraint
- class \Length_Constraint
- class \Character_Constraint
Expanded class hierarchy of Length_Constraint
1 string reference to 'Length_Constraint'
File
- constraints/
constraint_length.php, line 5
View source
class Length_Constraint extends Character_Constraint {
function validate($plaintext_password, $user = NULL) {
$len = strlen($plaintext_password);
return $len >= $this->minimumConstraintValue;
}
function getDescription() {
return t('Password must be longer than the specified minimum length.');
}
function getValidationErrorMessage() {
return t('Password must be a minimum of %numChars %characters in length.', array(
'%numChars' => $this->minimumConstraintValue,
'%characters' => format_plural($this->minimumConstraintValue, t('character'), t('characters')),
));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Character_Constraint:: |
function | 4 | ||
Constraint:: |
property | |||
Constraint:: |
property | |||
Constraint:: |
property | |||
Constraint:: |
function | |||
Constraint:: |
function | |||
Constraint:: |
function | |||
Constraint:: |
function | |||
Constraint:: |
function | |||
Length_Constraint:: |
function |
Overrides Character_Constraint:: |
||
Length_Constraint:: |
function |
Overrides Character_Constraint:: |
||
Length_Constraint:: |
function |
Overrides Character_Constraint:: |