You are here

public function TaxonomyDisplayHandlerForm::formValidate in Taxonomy display 7

Perform validation on the custom formFieldset when the user submits.

This method does not need to be defined in the implementing class as validation can be skipped in some cases.

Parameters

array $form: A fieldset containing the sub-form rendered to the user.

array $values: The values from the sub-form taken from $form_state, note any alterations will affect the values in $form_state.

Return value

TaxonomyTermDisplayHandler

See also

TaxonomyDisplayHandlerForm::formFieldset()

1 method overrides TaxonomyDisplayHandlerForm::formValidate()
TaxonomyDisplayAssociatedDisplayHandlerCore::formValidate in handlers/associated/core.inc
Validate the form values.

File

classes/handler_form.inc, line 66

Class

TaxonomyDisplayHandlerForm
Abstract class to act as the taxonomy display plugins form handing.

Code

public function formValidate($form, &$values) {

  // Override formValidate in your implementing handler if any validation work
  // is to be done.
  if (FALSE) {

    // This is an example of how you can set an error on one of your form
    // elements with the key 'example_element'.
    form_set_error(implode('][', $form['example_element']['#parents']), t('Error message'));
  }
  return $this;
}