You are here

function wf_crm_contact_component_required in Webform CiviCRM Integration 7.4

Same name and namespace in other branches
  1. 7.5 includes/contact_component.inc \wf_crm_contact_component_required()

Validation callback

Parameters

array $element:

array $form_state:

1 string reference to 'wf_crm_contact_component_required'
_webform_render_civicrm_contact in includes/contact_component.inc
Implements _webform_render_component().

File

includes/contact_component.inc, line 1188

Code

function wf_crm_contact_component_required($element, &$form_state) {
  if (empty($element['#value'])) {
    form_error($element, t('!name field is required.', array(
      '!name' => $element['#title'],
    )));
  }
}