You are here

function recipe_import_form_validate in Recipe 6

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

Validate handler for the single recipe import form.

File

./recipe.module, line 1481
recipe.module - share recipes

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.'));
  }
}