You are here

function uc_file_feature_form_validate in Ubercart 5

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

File

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

Code

function uc_file_feature_form_validate($form_id, $form_values) {
  if (!db_result(db_query("SELECT fid FROM {uc_files} WHERE filename = '%s'", $form_values['uc_file_filename']))) {
    form_set_error('uc_file_filename', t('%file is not a valid file or directory inside file download directory.', array(
      '%file' => $form_values['uc_file_filename'],
    )));
  }
}