function patterns_edit_validate in Patterns 6
Same name and namespace in other branches
- 5 patterns.module \patterns_edit_validate()
- 6.2 patterns.module \patterns_edit_validate()
- 7.2 includes/forms/editor.inc \patterns_edit_validate()
- 7 includes/forms/editor.inc \patterns_edit_validate()
Validate pattern modifications (make sure proper XML)
File
- ./
patterns.module, line 815 - Enables extremely simple adding/removing features to your site with minimal to no configuration
Code
function patterns_edit_validate($form, &$form_state) {
// @TODO Do validations....
$path = file_create_path(variable_get('patterns_save_xml', 'patterns'));
if (!file_check_directory($path, true)) {
form_set_error('form_token', t('Unable to create @path to save the new pattern to.', array(
'@path' => $path,
)));
}
}