function filebrowser_form_create_folder_validate in Filebrowser 8
Same name and namespace in other branches
- 6.2 filebrowser.form.create_folder.inc \filebrowser_form_create_folder_validate()
- 7.4 filebrowser.module \filebrowser_form_create_folder_validate()
- 7.2 filebrowser.module \filebrowser_form_create_folder_validate()
- 7.3 filebrowser.module \filebrowser_form_create_folder_validate()
Implements hook_validate() for creating a folder
1 string reference to 'filebrowser_form_create_folder_validate'
File
- ./
filebrowser.module, line 621 - Validates file path input on node form
Code
function filebrowser_form_create_folder_validate($form, $form_state) {
$node = $form_state['values']['node'];
_filebrowser_load_files($node);
$target = _filebrowser_encoding_to_fs($node, "{$node->file_listing['.']['full-path']}/{$form_state['values']['folder_name']}");
if (file_exists($target)) {
form_error($form['filebrowser_create_folder']['folder_name'], t("This folder already exists."));
}
}