function devel_generate_content_form_validate

FormAPI validation before generate nodes.

File

devel_generate/devel_generate.module, line 242

Code

function devel_generate_content_form_validate($form, &$form_state) {
    form_set_value($form['node_types'], array_filter($form_state['values']['node_types']), $form_state);
    if (!empty($form_state['values']['kill_content']) && empty($form_state['values']['node_types'])) {
        form_set_error('', t('Please select at least one content type to delete the content.'));
    }
}