function views_handler_argument::options_validate

Same name in other branches
  1. 7.x-3.x handlers/views_handler_argument.inc \views_handler_argument::options_validate()

Overrides views_handler::options_validate

File

handlers/views_handler_argument.inc, line 258

Class

views_handler_argument
Base class for arguments.

Code

function options_validate(&$form, &$form_state) {
    if (empty($form_state['values']['options'])) {
        return;
    }
    // Let the plugins do validation.
    $default_id = $form_state['values']['options']['default_argument_type'];
    $plugin = $this->get_plugin('argument default', $default_id);
    if ($plugin) {
        $plugin->options_validate($form['argument_default'][$default_id], $form_state, $form_state['values']['options']['argument_default'][$default_id]);
    }
    $validate_id = $form_state['values']['options']['validate_type'];
    $plugin = $this->get_plugin('argument validator', $validate_id);
    if ($plugin) {
        $plugin->options_validate($form['argument_validate'][$default_id], $form_state, $form_state['values']['options']['argument_validate'][$validate_id]);
    }
}