1 block.hero.inc BlockHero::formValidate($form, &$form_state)

Validates the form settings.

Overrides BlockText::formValidate

File

core/modules/layout/includes/block.hero.inc, line 82

Class

BlockHero
BlockHero extends BlockText

Code

function formValidate($form, &$form_state) {
  parent::formValidate($form, $form_state);

  // Check that one of title, text, or image, is provided.
  if (empty($form_state['values']['image']) && empty($form_state['values']['title']) && empty($form_state['values']['content']['value'])) {
    form_error($form['image'], t('Background image, a Display title, or Block content must be provided.'));
  }
}