Index: includes/form.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/form.inc,v retrieving revision 1.177 diff -u -p -r1.177 form.inc --- includes/form.inc 31 Jan 2007 15:49:22 -0000 1.177 +++ includes/form.inc 10 Feb 2007 15:21:50 -0000 @@ -526,10 +526,7 @@ function _form_validate($elements, $form /* Validate the current input */ if (!isset($elements['#validated']) || !$elements['#validated']) { if (isset($elements['#needs_validation'])) { - // An empty textfield returns '' so we use empty(). An empty checkbox - // and a textfield could return '0' and empty('0') returns TRUE so we - // need a special check for the '0' string. - if ($elements['#required'] && empty($elements['#value']) && $elements['#value'] !== '0') { + if ($elements['#required'] && strlen(trim($elements['#value'])) == 0) { form_error($elements, t('!name field is required.', array('!name' => $elements['#title']))); }