validate_password
Validate that the password meets all validator requirements.
If the password is valid, return None.
If the password is invalid, raise ValidationError with all error messages.
def validate_password(
password: string,
user: object,
password_validators: list
) - > null
Validate that the password meets all validator requirements.
Parameters
| Name | Type | Description |
|---|---|---|
| password | string | The raw password string to be checked for complexity and security requirements. |
| user | object | The user instance to provide context for validation, such as preventing passwords similar to user attributes. |
| password_validators | list | A collection of validator instances to execute; defaults to the system's configured password validators if not provided. |
Returns
| Type | Description |
|---|---|
null | Returns None if the password passes all validation checks. |