Put class error when I use validate
If the only validation you are looking for is to make sure the fields are required, then you don't need to call to a validation function. The solution in that case will be to set the "required" attribute to TRUE for the fields description and keywords in the "form_alter" function. This solution will give you the style you are looking for in the required fields.

Something like this (this is a proof of concept):

mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  $form_id = $form['form_id']['#value'];
  if ($form_id == "article_node_form") {
    // Make META DESCRIPTION required
    $form['metatags']['description'] = array('#require' =&gt; TRUE,);

    // Make META KEYWORDS required
    $form['metatags']['keywords'] = array('#require' =&gt; TRUE,);
  }
}


To get the right field names do the following:

mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  $form_id = $form['form_id']['#value'];
  if ($form_id == "article_node_form") {

   print_r($form);

  }
}