You are here

function nodewords_filter_regex_validate in Nodewords: D6 Meta Tags 6

Function to validate the regular expression.

1 string reference to 'nodewords_filter_regex_validate'
nodewords_form_node_type_form_alter in ./nodewords.module
Implements hook_form_FORM_ID_alter().

File

./nodewords.admin.inc, line 379
Administration interface for nodewords.module.

Code

function nodewords_filter_regex_validate($element, &$form_state) {
  if (!empty($element['#value'])) {
    $value = trim($element['#value']);
    if (empty($value)) {
      form_error($element, t('The regular expression contains only spaces, and other not printable characters.'));
    }
  }
}