You are here

function spamicide_admin_form_validate in Spamicide 6

Same name and namespace in other branches
  1. 5 spamicide.module \spamicide_admin_form_validate()
  2. 7 spamicide.module \spamicide_admin_form_validate()

Implementation of hook_form_validate Enter description here ...

_state

Parameters

unknown_type $form:

File

./spamicide.module, line 187
This module provides yet another tool to eliminate spam.

Code

function spamicide_admin_form_validate($form, &$form_state) {
  foreach ($form_state['values']['spamicide_forms'] as $spamicide_form_id => $data) {
    if (preg_match_all('[\\W]', $data['form_field'], $str)) {
      form_set_error('spamicide_forms][' . $spamicide_form_id . '][form_field', t("Only AlphaNumeric characters or the underscore please"));
    }
  }
}