Form Set Error in custom module
You can try this  under your hook_validate

Here i added new function name mymodule_soft_block_validate

 function mymodule_validators() {
        return array('user_login_name_validate', 'user_login_authenticate_validate', 'mymodule_soft_block_validate','user_login_final_validate','mymodule_validate');
    }

function  mymodule_soft_block_validate($form, &amp;$form_state) {
        $pass=$form_state['values']['pass'];
        if(empty($pass) || $pass=='') {
            form_set_error('name', t('dummy message'));
            return $form;
        }           

}