Index: includes/theme.inc
===================================================================
--- includes/theme.inc	(revision 5844)
+++ includes/theme.inc	(working copy)
@@ -602,6 +617,9 @@
     }
   }
 
+  if ($required || $error) {
+    $value = '<span class="'. _form_get_class('', $required, $error) .'">'. $value .'</span>';
+  }
   $output .= " $value\n";
 
   if ($description) {
