function download_file_settings_validate in DownloadFile 6
Same name and namespace in other branches
- 7.3 download_file.admin.inc \download_file_settings_validate()
- 7 download_file.admin.inc \download_file_settings_validate()
- 7.2 download_file.admin.inc \download_file_settings_validate()
Validate download_file_settings form submissions.
File
- ./
download_file.admin.inc, line 28 - Download file administration settings.
Code
function download_file_settings_validate($form, &$form_state) {
$format = $form_state['values']['download_file_accessible_format'];
if (strpos($format, '!extension') === FALSE || strpos($format, '!file_size') === FALSE) {
form_set_error('download_file_accessible_format', t('The format must contain the two variables <em>!extension</em> and <em>!file_size</em>.'));
}
else {
if (strip_tags($format) != $format) {
form_set_error('download_file_accessible_format', t('The format must not contain any HTML tags.'));
}
}
}