function key_provider_file_config_form_validate in Key 7.2
Validate callback for the configuration form.
1 string reference to 'key_provider_file_config_form_validate'
File
- plugins/
key_provider/ file.inc, line 67
Code
function key_provider_file_config_form_validate($form, &$form_state) {
$file = $form_state['values']['provider_settings']['file_location'];
// Verify that the file exists.
if (!is_file($file)) {
form_set_error('file_location', t('A file at the specified location does not exist.'));
}
elseif (!is_readable($file)) {
form_set_error('file_location', t('The file at the specified location is not readable.'));
}
}