You are here

function patterns_edit_validate in Patterns 6.2

Same name and namespace in other branches
  1. 5 patterns.module \patterns_edit_validate()
  2. 6 patterns.module \patterns_edit_validate()
  3. 7.2 includes/forms/editor.inc \patterns_edit_validate()
  4. 7 includes/forms/editor.inc \patterns_edit_validate()

Validate pattern modifications (make sure proper XML)

File

./patterns.module, line 821
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,
    )));
  }
}