how to check in ajax form callback if form for failed validation
function popover_ajax_callback($form, &amp;$form_state) {
  $errors = form_get_errors();
  if( $errors ) {
    // error detected, do something
  } else {
    // everything is ok
  }
}


but your return value is not ok. You need to return an renderable array. You may want to try someting like this:

return array('#markup' =&gt; '&lt;div id="ajaxchanger"&gt;' . $form_state['values']['first']['field_firstname'] . '&lt;/div&gt;');