function patterns_export_validate in Patterns 7
Same name and namespace in other branches
- 7.2 patterns_export/patterns_export.module \patterns_export_validate()
validation function for import_module_form
1 string reference to 'patterns_export_validate'
- patterns_export_page1 in patterns_export/
patterns_export.module
File
- patterns_export/
patterns_export.module, line 155
Code
function patterns_export_validate($form, &$form_state) {
if (!isset($form_state['values']['format'])) {
form_set_error('format', t('No valid format selected.'));
}
if (!empty($form_state['values']['filename'])) {
form_set_error('format', t('Please specify a valid file name.'));
}
if (!isset($form_state['values']['export']['to'])) {
form_set_error('export[to]', t('Please specify a valid export action.'));
}
if (!isset($form_state['values']['export']['mode'])) {
form_set_error('export[mode]', t('Please specify a valid export mode.'));
}
if (!isset($form_state['values']['info'])) {
form_set_error('to', t('No info section found.'));
}
return TRUE;
}