1 block_example.inc BlockExample::formValidate($form, &$form_state)

Validates the form settings.

Overrides Block::formValidate

File

modules/examples/block_example/block_example.inc, line 80

Class

BlockExample
BlockExample extends Block

Code

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

  // We'll make it a requirement to include some content.
  if (empty($form_state['values']['content'])) {
    form_error($form['content'], t('Please enter some content.'));
  }
}