diff --git a/lib/pear/HTML/QuickForm/Rule/Required.php b/lib/pear/HTML/QuickForm/Rule/Required.php
index d7f8274..b0b9618 100644
--- a/lib/pear/HTML/QuickForm/Rule/Required.php
+++ b/lib/pear/HTML/QuickForm/Rule/Required.php
@@ -36,7 +36,8 @@ class HTML_QuickForm_Rule_Required extends HTML_QuickForm_Rule
      */
     function validate($value, $options = null)
     {
-        if ((string)$value == '') {
+        if (trim(preg_replace('/<\/?(div|s(pan|u(b|p))|p(re)?|br|h\d|address)( \w*="[^"]*")?([ ]*)?\/?>/', '', (string)$value)) == '') {
             return false;
         }
         return true;
@@ -45,7 +46,7 @@ class HTML_QuickForm_Rule_Required extends HTML_QuickForm_Rule
 
     function getValidationScript($options = null)
     {
-        return array('', "{jsVar} == ''");
+        return array('', '{jsVar}.replace(/<\/?(div|s(pan|u(b|p))|p(re)?|br|h\d|address)( \w*="[^"]*")?([ ]*)?\/?>/g,"").replace(/^\s+|\s+$/g,"") == ""');
     } // end func getValidationScript
 
 } // end class HTML_QuickForm_Rule_Required
