You are here

function spamicide_admin_form_validate in Spamicide 5

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

File

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

Code

function spamicide_admin_form_validate($form, $form_values) {
  foreach ($form_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"));
    }
  }
}