Drupal 7: Add markup to form during validation
In your validate you can set a variable in the $form_state that tells if the validation failed or not:

function webform_validate_handler(&amp;$form, &amp;$form_state) {
  if ($mail_invalid) {
    $form_state['mail_invalid'] = TRUE;
  }
  else {
    $form_state['mail_invalid'] = FALSE;
  }
}


Then in your form, you can check for empty($form_state['mail_invalid']) and show the markup when the empty check returns false.

function hook_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  ...
  if (!empty($form_state['mail_invalid']) {
    $form['markup'] = ...;
  }
}