You are here

function ajax_validator_set in Ajax 6

Sets the validator

Parameters

$form Assoc:

Return value

Bool

1 call to ajax_validator_set()
ajax_form_alter in ./ajax.module
hook_form_alter

File

./ajax.module, line 141

Code

function ajax_validator_set(&$form) {
  $form['#validate'][] = 'ajax_validator';
  if (empty($form['#attributes']['class'])) {
    $form['#attributes']['class'] = 'ajax-form';
  }
  else {
    $form['#attributes']['class'] .= ' ajax-form';
  }
  return TRUE;
}