Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.1049
diff -r1.1049 common.inc
5537a5538,5540
> 'form_error_marker' => array(
> 'render element' => 'element',
> ),
Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.401
diff -r1.401 form.inc
843c843,846
< form_error($elements, $t('!name field is required.', array('!name' => $elements['#title'])));
---
> form_error($elements, $t('!name field is required.', array(
> '!field_id' => $elements['#id'],
> '!name' => $elements['#title'],
> )));
2801a2805
> $error = theme('form_error_marker', array('element' => $element));
2806c2810
< $output .= ' \n";
---
> $output .= ' \n";
2809c2813
< $output .= ' \n";
---
> $output .= ' \n";
2845a2850,2885
> * Theme the error marker for form elements.
> *
> * @param $variables
> * An associative array containing:
> * - element: An associative array containing the properties of the element.
> * @return
> * A string with a marker to identify an error, otherwise an empty string.
> *
> * @ingroup themeable
> */
> function theme_form_error_marker($variables) {
> $element = $variables['element'];
> // This is also used in the installer, pre-database setup.
> $t = get_t();
>
> $output = '';
> if ($raw_error = form_get_error($element)) {
> // A simple call to empty() will not cut it here as some fields, like
> // checkboxes, can return a valid value of '0'. Instead, check the
> // length if it's a string, and the item count if it's an array.
> $error = ($element['#required'] && (!count($element['#value']) ||
> (is_string($element['#value']) && strlen(trim($element['#value'])) == 0))) ?
> $t('This field is required.') : strip_tags($raw_error);
> $attributes = array(
> 'class' => 'error',
> 'title' => $error,
> );
> $output .= '!';
> $output .= ' ' . $error . '';
> $output .= '';
> }
>
> return $output;
> }
>
> /**
Index: modules/field/field.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.test,v
retrieving revision 1.67
diff -r1.67 field.test
1435c1435
< $this->assertRaw(t('!name field is required.', array('!name' => $this->instance['label'])), 'Required field with no value fails validation');
---
> $this->assertText(t('!name field is required.', array('!name' => $this->instance['label'])), 'Required field with no value fails validation');
1451c1451
< $this->assertRaw(t('!name field is required.', array('!name' => $this->instance['label'])), 'Required field with no value fails validation');
---
> $this->assertText(t('!name field is required.', array('!name' => $this->instance['label'])), 'Required field with no value fails validation');
Index: modules/simpletest/tests/form.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/form.test,v
retrieving revision 1.25
diff -r1.25 form.test
66c66
< $required_marker_preg = '@\*@';
---
> $required_marker_preg = '@\*.*@';