1 views_plugin_query_default.inc views_element_validate_tags($element, &$form_state)

Validation callback for query tags.

File

core/modules/views/plugins/views_plugin_query_default.inc, line 1653
Defines the default query object.

Code

function views_element_validate_tags($element, &$form_state) {
  $values = array_map('trim', explode(',', $element['#value']));
  foreach ($values as $value) {
    if (preg_match("/[^a-z_]/", $value)) {
      form_error($element, t('The query tags may only contain lower-case alphabetical characters and underscores.'));
      return;
    }
  }
}