You are here

function sweaver_menu_callback_form_validate in Sweaver 6

Same name and namespace in other branches
  1. 7 sweaver.module \sweaver_menu_callback_form_validate()

Sweaver menu callback validate.

File

./sweaver.module, line 621
Sweaver functions.

Code

function sweaver_menu_callback_form_validate($form, &$form_state) {
  $sweaver_plugin = Sweaver::get_instance()
    ->get_plugin($form['#plugin_name']);
  $callback_validate_function = $form['#callback_method'] . '_validate';
  if (method_exists($sweaver_plugin, $callback_validate_function)) {
    $sweaver_plugin
      ->{$callback_validate_function}($form, $form_state);
  }
}