You are here

function recipe_import_form_validate in Recipe 7

Same name and namespace in other branches
  1. 6 recipe.module \recipe_import_form_validate()
  2. 7.2 recipe.admin.inc \recipe_import_form_validate()

Form validation handler for recipe_import_form().

See also

recipe_import_form_submit()

File

./recipe.module, line 1563
Contains functions for Recipe node CRUD and display.

Code

function recipe_import_form_validate($form, &$form_state) {

  // Make sure that they choose an import format.
  // Otherwise the text entry is lost and the import fails with an error.
  if (empty($form_state['values']['recipe_format'])) {
    form_set_error('recipe_format', t('You must choose a recipe import format.'));
  }
}