You are here

function value_is_element_info_alter in Value is 7

Implements hook_element_info_alter().

File

./value_is.module, line 11
All the element validators for #element_validate.

Code

function value_is_element_info_alter(&$info) {

  // Required file.
  if (isset($info['file'])) {
    if (!isset($info['file']['#validate'])) {
      $info['file']['#validate'] = array();
    }
    array_unshift($info['file']['#validate'], '_value_is_file_element_validate');
    $info['file']['#process'][] = '_value_is_file_element_process';
  }

  // Disabled checkboxes.
  if (isset($info['checkboxes'])) {
    $info['checkboxes']['#process'][] = '_value_is_disabled_options_process';
    $info['checkboxes']['#value_callback'] = '_value_is_disabled_options_value_callback';
  }
}