ReuseValidator
class ReuseValidator extends AbstractTranslatableValidator implements ValidatorForSubjectInterface (View source)
Traits
A trait that provides an implementation of ValidatorInterface::isValid
Constants
E_PASSWORD_RECENTLY_USED |
|
Properties
protected array | $translatable_requirements | from AbstractTranslatableValidator | |
protected array | $translatable_errors | from AbstractTranslatableValidator | |
private EntityManagerInterface | $entityManager | ||
private int | $maxReuse |
Methods
Set the requirement string to a mixed value.
Set the error string to a string or to a closure.
Get the validator requirements in the form of an array keyed by it's respective error code.
Get an error string given a code and a passed value.
Check to see if $value a valid stand in for a translatable string.
No description
Is this mixed value valid for the specified (optional) subject?
Check whether a string has been used against an id
Verify whether an obfuscated password matches a tracked used password
Protected accessor method for subclasses
Protected accessor method for subclasses
No description
Details
setRequirementString(int $code, string|Closure $message)
Set the requirement string to a mixed value.
setErrorString(int $code, string|Closure $message)
Set the error string to a string or to a closure.
string[]
getRequirementStrings()
Get the validator requirements in the form of an array keyed by it's respective error code.
protected string|mixed
getErrorString(int $code, mixed $value, mixed $default = null)
Get an error string given a code and a passed value.
protected bool
isTranslatableStringValueValid(Closure|string|mixed $value)
Check to see if $value a valid stand in for a translatable string.
isValid($mixed, ArrayAccess $error = null)
No description
__construct(EntityManagerInterface $entityManager, $maxReuse = 5)
No description
bool
isValidFor(mixed $mixed, mixed $subject = null, ArrayAccess $error = null)
Is this mixed value valid for the specified (optional) subject?
private bool
hasBeenUsed(string $string, $id)
Check whether a string has been used against an id
private bool
matches(string $string, UsedString $usedString)
Verify whether an obfuscated password matches a tracked used password
protected EntityManagerInterface
getEntityManager()
Protected accessor method for subclasses
protected int
getMaxReuseCount()
Protected accessor method for subclasses
private int
resolveUserID($subject)
No description