You are here

function webform_components_form_validate in Webform 6.2

Same name and namespace in other branches
  1. 5.2 webform_components.inc \webform_components_form_validate()
  2. 6.3 includes/webform.components.inc \webform_components_form_validate()
  3. 7.4 includes/webform.components.inc \webform_components_form_validate()
  4. 7.3 includes/webform.components.inc \webform_components_form_validate()

File

./webform_components.inc, line 233
Webform module components handling.

Code

function webform_components_form_validate($form, &$form_state) {
  if (isset($_POST['op']) && $_POST['op'] == t('Add') && drupal_strlen(trim($form_state['values']['add']['name'])) <= 0) {
    form_set_error('add][name', t('When adding a new component, the name field is required.'));
  }
}