Skip to main content

get_password_validators

Returns a list of validator instances based on the provided configuration by importing the specified classes and initializing them with their respective options.

def get_password_validators(
validator_config: list
) - > list

Resolves and instantiates a list of password validator classes based on a provided configuration dictionary. Use this to initialize the validation logic defined in the AUTH_PASSWORD_VALIDATORS setting.

Parameters

NameTypeDescription
validator_configlistA list of dictionaries where each entry contains a 'NAME' string representing the import path of the validator class and an optional 'OPTIONS' dictionary for constructor arguments.

Returns

TypeDescription
listA list of initialized validator instances ready to perform password strength checks.