(password)
Ensure that password meets requirements

    Returns:
        An error message to show
Ensure that password meets requirements
Ensure that password meets requirements
def validate_password_rules(password) -> Optional[str]:
    """Ensure that password meets requirements

    Returns:
        An error message to show
    """
    strength = zxcvbn(password, user_inputs=['commcare', 'hq', 'dimagi', 'commcarehq'])
    if strength['score'] < 2:
        return _('Password is not strong enough. Try making your password more complex.')
def validate_password_rules ( password ) -> Optional [ str ] : strength = zxcvbn ( password , user_inputs = [ 'commcare' , 'hq' , 'dimagi' , 'commcarehq' ] ) if strength [ 'score' ] < 2 : return _ ( 'Password is not strong enough. Try making your password more complex.' )