Implements hook_field_widget_error().
function text_field_widget_error($element, $error, $form, &$form_state) {
switch ($error['error']) {
case 'text_summary_max_length':
$error_element = $element[$element['#columns'][1]];
break;
default:
$error_element = $element[$element['#columns'][0]];
break;
}
form_error($error_element, $error['message']);
}