class PasswordPolicyValidation in Password Policy 8.3
A construct to organize validation of a password policy.
@package Drupal\password_policy
Hierarchy
- class \Drupal\password_policy\PasswordPolicyValidation
Expanded class hierarchy of PasswordPolicyValidation
6 files declare their use of PasswordPolicyValidation
- CharacterTypes.php in password_policy_character_types/
src/ Plugin/ PasswordConstraint/ CharacterTypes.php - ConsecutiveCharacters.php in password_policy_consecutive/
src/ Plugin/ PasswordConstraint/ ConsecutiveCharacters.php - PasswordCharacter.php in password_policy_characters/
src/ Plugin/ PasswordConstraint/ PasswordCharacter.php - PasswordHistory.php in password_policy_history/
src/ Plugin/ PasswordConstraint/ PasswordHistory.php - PasswordLength.php in password_policy_length/
src/ Plugin/ PasswordConstraint/ PasswordLength.php
File
- src/
PasswordPolicyValidation.php, line 10
Namespace
Drupal\password_policyView source
class PasswordPolicyValidation {
protected $error = NULL;
protected $valid = TRUE;
/**
* Set error message and mark as invalid.
*/
public function setErrorMessage($error) {
$this->valid = FALSE;
$this->error = $error;
}
/**
* Output error message.
*
* @return string
* A message representing the error message of the policy's constraints.
*/
public function getErrorMessage() {
return $this->error;
}
/**
* Output validation state.
*
* @return bool
* Whether or not the policy has an error.
*/
public function isValid() {
return $this->valid;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PasswordPolicyValidation:: |
protected | property | ||
PasswordPolicyValidation:: |
protected | property | ||
PasswordPolicyValidation:: |
public | function | Output error message. | |
PasswordPolicyValidation:: |
public | function | Output validation state. | |
PasswordPolicyValidation:: |
public | function | Set error message and mark as invalid. |