function webform_components_form_validate in Webform 5.2
Same name and namespace in other branches
- 6.3 includes/webform.components.inc \webform_components_form_validate()
- 6.2 webform_components.inc \webform_components_form_validate()
- 7.4 includes/webform.components.inc \webform_components_form_validate()
- 7.3 includes/webform.components.inc \webform_components_form_validate()
File
- ./
webform_components.inc, line 230 - Webform module components handling.
Code
function webform_components_form_validate($form_id, $form_values) {
if (isset($_POST['op']) && $_POST['op'] == t('Add') && strlen(trim($form_values['add']['name'])) <= 0) {
form_set_error('add][name', t('When adding a new component, the name field is required.'));
}
}