You are here

public function TaxonomyDisplayAssociatedDisplayHandlerCore::formValidate in Taxonomy display 7

Validate the form values.

Overrides TaxonomyDisplayHandlerForm::formValidate

See also

TaxonomyDisplayHandlerForm::formValidate()

File

handlers/associated/core.inc, line 81

Class

TaxonomyDisplayAssociatedDisplayHandlerCore
Add a display handler that will use the Drupal core method of display.

Code

public function formValidate($form, &$values) {
  if ($values['associated_per_page'] !== '0' && !preg_match('#^[1-9][0-9]*$#', $values['associated_per_page'])) {
    form_set_error(implode('][', $form['associated_per_page']['#parents']), t('The number of associated content entities per page must be a whole, non-negative number.'));
  }
  return $this;
}