function _google_tag_validate_data_layer in GoogleTagManager 7.2
Same name and namespace in other branches
- 7 includes/variable.inc \_google_tag_validate_data_layer()
Element validation handler for google_tag_data_layer.
1 string reference to '_google_tag_validate_data_layer'
- _google_tag_variable_info_advanced in includes/
variable.inc - Implements hook_variable_info().
File
- includes/
variable.inc, line 530 - Contains the variable definitions.
Code
function _google_tag_validate_data_layer($variable, $options, $element, $form, &$form_state) {
$value = drupal_array_get_nested_value($form_state['values'], $element['#parents']);
$value = trim($value);
drupal_array_set_nested_value($form_state['values'], $element['#parents'], $value);
return _google_tag_data_layer_verify($value);
}