How do I pass additional values to #element_validate so they can be used for validation?
I'm using hook_form_alter() and Drupal 7.
//Example 1
function my_validation_function($form, &$form_state) {
//Validation Code
}
I would like to use:
//Example 2
function my_validation_function($form, &$form_state, $additional_values) {
//Validation Code with access to $additional_values
}
This works for example 1:
$form['field']['#element_validate'] = array('my_validation_function');
How do I pass $additional_values
to example 2 using $form['field']['#element_validate']