How to use the password_reset hook to validate new password and display error

You can try using hook the validate_password_reset to validate password.
Following code can be used to validate alphanumeric password.

    add_action('validate_password_reset','wdm_validate_password_reset',10,2);
    function wdm_validate_password_reset( $errors, $user)
    {
        $exp = '/^(?=.*\d)((?=.*[a-z])|(?=.*[A-Z])).{6,32}$/';

        if(strlen($_POST['pass1'])<6 || !preg_match($exp, $_POST['pass1']) )
               $errors->add( 'error',  'Password must be alphanumeric and contain minimum 6 characters.','');
    }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)