You are here

function uc_file_feature_settings_validate in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_file/uc_file.module \uc_file_feature_settings_validate()
  2. 7.3 uc_file/uc_file.module \uc_file_feature_settings_validate()

File

uc_file/uc_file.module, line 540
Allows products to be associated with downloadable files.

Code

function uc_file_feature_settings_validate($form_id, $form_values) {
  if (!empty($form_values['uc_file_base_dir']) && $form_values['op'] == t('Save configuration') && !is_dir($form_values['uc_file_base_dir'])) {
    form_set_error('uc_file_base_dir', t('%dir is not a valid file or directory', array(
      '%dir' => $form_values['uc_file_base_dir'],
    )));
  }
}