You are here

public function RulesLoopUI::form_validate in Rules 7.2

Implements RulesPluginUIInterface.

Overrides RulesPluginUI::form_validate

File

ui/ui.plugins.inc, line 239
Contains UI for diverse plugins provided by Rules.

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,
    )));
  }
}