You are here

function composer_manager_settings_form_validate in Composer Manager 6.2

Same name and namespace in other branches
  1. 6 composer_manager.admin.inc \composer_manager_settings_form_validate()
  2. 7.2 composer_manager.admin.inc \composer_manager_settings_form_validate()
  3. 7 composer_manager.admin.inc \composer_manager_settings_form_validate()

Form validation handler for composer_manager_settings_form().

1 string reference to 'composer_manager_settings_form_validate'
composer_manager_settings_form in ./composer_manager.admin.inc
Administrative settings for the Composer Manager module.

File

./composer_manager.admin.inc, line 53
Administrative settings for the Composer Manager module.

Code

function composer_manager_settings_form_validate($form, &$form_state) {
  module_load_include('inc', 'composer_manager', 'composer_manager.writer');
  $autobuild_file = $form_state['values']['composer_manager_autobuild_file'];
  $file_dir = $form_state['values']['composer_manager_file_dir'];
  if ($autobuild_file && !composer_manager_prepare_directory($file_dir)) {
    form_set_error('composer_manager_file_dir', t('Composer file directory must be writable'));
  }
}