function RulesLoopUI::form_validate

Overrides RulesPluginUI::form_validate

File

ui/ui.plugins.inc, line 239

Class

RulesLoopUI
UI for Rules loops.

Code

public function form_validate($form, &$form_state) {
    parent::form_validate($form, $form_state);
    $vars = $this->element
        ->availableVariables();
    $name = $this->element->settings['item:var'];
    if (isset($vars[$name])) {
        form_error($form['item']['var'], t('The variable name %name is already taken.', array(
            '%name' => $name,
        )));
    }
}