Can I highlight an invalid form field without assigning a message for it? I have a form which presents three input fields which are later combined into a single phone number. When that phone number doesn't validate (doesn't match /^\d{10}$/), I want to show a single message saying the phone number is incorrectly formatted, but I want to highlight all three input fields. Is this possible? The best I have come up with is this:

form_set_error('firstBox', $theMessage);
form_set_error('secondBox', " ");
form_set_error('thirdBox', " ");


This way, all fields are highlighted and I get the message only once, but I still get bullet points for the empty messages...



Is there a better solution for this?
D'oh.  In Drupal 6 at least, just call form_set_error(FIELD) without the message and it should highlight the field and not set a message.  You are sending a space, so you are getting a space as a message.

Code in Question:

function form_set_error($name = NULL, $message = '', $reset = FALSE) {
  static $form = array();
  if ($reset) {
    $form = array();
  }
  if (isset($name) &amp;&amp; !isset($form[$name])) {
    $form[$name] = $message;
    if ($message) {
      drupal_set_message($message, 'error');
    }
  }
  return $form;
}