You are here

function wf_crm_cs_validate in Webform CiviCRM Integration 7.4

Same name and namespace in other branches
  1. 7.5 includes/wf_crm_admin_component.inc \wf_crm_cs_validate()
  2. 7.3 webform_civicrm_admin.inc \wf_crm_cs_validate()

Drupal FAPI validate callback Validate checksum lifespan

1 string reference to 'wf_crm_cs_validate'
wf_crm_admin_component::alterForm in includes/wf_crm_admin_component.inc
Alter back-end webform component edit forms. Called by hook_form_alter() whenever editing a webform component.

File

includes/wf_crm_admin_component.inc, line 688

Code

function wf_crm_cs_validate($form, &$form_state) {
  if (!is_numeric($form_state['values']['value']) || $form_state['values']['value'] < 0) {
    form_error($form['value'], t('Please enter a valid number of days.'));
  }
}