class PasswordValidatorServiceProvider extends Provider (View source)

Properties

protected Application $app from  Provider
protected Repository $config

The config repository we're using to register

Methods

__construct(Application $app)

No description

from  Provider
register()

Registers the services provided by this provider.

provides()

No description

from  Provider
applyLengthValidators(ValidatorManagerInterface $manager)

Apply configured password length validators

getMaximumRequirement()

Get maximum length validator

getMinimumRequirement()

Get minimum length validator

applyMinMaxStrings($minimum, $maximum)

Apply translatable strings to minimum and maximum requirements

applyStringRequirementValidators(ValidatorManagerInterface $manager)

Apply validators that require specific substrings

regexValidator(string $regex, string $requirement)

Create a regex validator

wrappedRegexValidator($regex, $requirementString)

Create a closure validator that wraps a regex validator and handles all errors If the given regex is invalid, we will deny all passwords!

Details

__construct(Application $app)

No description

Parameters

Application $app

register()

Registers the services provided by this provider.

provides()

No description

protected applyPasswordReuseValidator(ValidatorManagerInterface $manager)

No description

Parameters

ValidatorManagerInterface $manager

protected applyLengthValidators(ValidatorManagerInterface $manager)

Apply configured password length validators

Parameters

ValidatorManagerInterface $manager

protected MaximumLengthValidator|null getMaximumRequirement()

Get maximum length validator

Return Value

MaximumLengthValidator|null

protected MinimumLengthValidator|null getMinimumRequirement()

Get minimum length validator

Return Value

MinimumLengthValidator|null

protected applyMinMaxStrings($minimum, $maximum)

Apply translatable strings to minimum and maximum requirements

Parameters

$minimum
$maximum

protected applyStringRequirementValidators(ValidatorManagerInterface $manager)

Apply validators that require specific substrings

Parameters

ValidatorManagerInterface $manager

protected RegexValidator regexValidator(string $regex, string $requirement)

Create a regex validator

Parameters

string $regex
string $requirement

Return Value

RegexValidator

protected applyRegexRequirements(ValidatorManagerInterface $manager)

No description

Parameters

ValidatorManagerInterface $manager

protected ClosureValidator|mixed wrappedRegexValidator($regex, $requirementString)

Create a closure validator that wraps a regex validator and handles all errors If the given regex is invalid, we will deny all passwords!

Parameters

$regex
$requirementString

Return Value

ClosureValidator|mixed