function demo_admin_settings_validate in Demonstration site (Sandbox / Snapshot) 7
Same name and namespace in other branches
- 6 demo.admin.inc \demo_admin_settings_validate()
Form validation handler for demo_admin_settings().
1 string reference to 'demo_admin_settings_validate'
- demo_admin_settings in ./
demo.admin.inc - Form builder for Demo module settings.
File
- ./
demo.admin.inc, line 40 - Demonstration Site administrative pages.
Code
function demo_admin_settings_validate($form, &$form_state) {
// Passing full URI for validation.
$directory = 'private://' . $form_state['values']['demo_dump_path'];
if (!file_prepare_directory($directory, FILE_CREATE_DIRECTORY)) {
form_set_error('demo_dump_path', t('The snapshot directory %directory could not be created.', array(
'%directory' => $directory,
)));
}
}