You are here

function patterns_enable_pattern_validate in Patterns 7.2

Same name and namespace in other branches
  1. 7 patterns.module \patterns_enable_pattern_validate()

<hook_validate>

File

./patterns.module, line 448

Code

function patterns_enable_pattern_validate($form, &$form_state) {
  if (!in_array($form_state['values']['mode'], array(
    PATTERNS_EXEC_BATCH,
    PATTERNS_EXEC_PHP,
  ))) {
    form_error($element, t('Mode must be one of \'batch\' or \'php\'.'));
  }
  return TRUE;
}