You are here

function regcode_voucher_profiletab_form_validate in Registration codes 7

Same name and namespace in other branches
  1. 7.2 regcode_voucher/regcode_voucher.module \regcode_voucher_profiletab_form_validate()

Validate handler for regcode_voucher_admin_form().

File

regcode_voucher/regcode_voucher.module, line 198
Main code and hooks for regcode voucher module.

Code

function regcode_voucher_profiletab_form_validate($form, $form_state) {
  $code = regcode_code_validate($form_state['values']['regcode_code']);
  if (!is_object($code)) {
    form_error($form['regcode_code'], regcode_errormsg($code));
    watchdog('regcode', 'User entered invalid registration code (@code)', array(
      '@code' => $form_state['values']['regcode_code'],
    ), WATCHDOG_WARNING);
  }
}