function push_notifications_admin_form_validate in Push Notifications 7
Validation handler for push notification configuration form.
File
- includes/
push_notifications.admin.inc, line 302 - Admin files for Push Notifications module.
Code
function push_notifications_admin_form_validate($form, &$form_state) {
// If custom certificate directory is set, ensure the directory exists.
$custom_dir = $form_state['values']['push_notifications_apns_certificate_folder'];
if (!empty($custom_dir)) {
if (!file_exists(check_plain($custom_dir))) {
form_set_error('push_notifications_apns_certificate_folder', t('Custom certificate directory does not exist. Please create the path before saving your configuration.'));
}
}
}