You are here

function _terms_of_use_validate_checkbox in Terms of Use 6

Validation callback; verify that checkbox is checked.

1 string reference to '_terms_of_use_validate_checkbox'
terms_of_use_form_user_register_alter in ./terms_of_use.module
Implementation of hook_form_form_id_alter().

File

./terms_of_use.module, line 214
Adds Terms of Use to the 'user_register' form.

Code

function _terms_of_use_validate_checkbox($form, &$form_state) {
  $value = $form_state['values']['terms_of_use'];
  if ($value == 0) {
    form_set_error('terms_of_use', t('You must agree with the !terms to get an account.', array(
      '!terms' => filter_xss(variable_get('terms_of_use_fieldset_name', t('Terms of Use'))),
    )));
  }
}