function patterns_edit_validate in Patterns 7
Same name and namespace in other branches
- 5 patterns.module \patterns_edit_validate()
- 6.2 patterns.module \patterns_edit_validate()
- 6 patterns.module \patterns_edit_validate()
- 7.2 includes/forms/editor.inc \patterns_edit_validate()
Form validation handler for patterns_edit_form().
@todo Do this properly.
See also
File
- includes/
forms/ editor.inc, line 240 - Functions, forms related to the Patterns editor.
Code
function patterns_edit_validate($form, &$form_state) {
// must be real path
$path = patterns_path_get_files_dir();
if (!file_prepare_directory($path, FILE_CREATE_DIRECTORY)) {
form_set_error('form_token', t('Path @path does not exist or is not writable.', array(
'@path' => $path,
)));
}
}