function notifications_subscription_destination_subform_validate in Notifications 7
Same name and namespace in other branches
- 6.4 notifications.module \notifications_subscription_destination_subform_validate()
Validate submitted destination
1 string reference to 'notifications_subscription_destination_subform_validate'
- notifications_subscription_destination_subform in notifications_account/
notifications_account.module - Add destination subform
File
- notifications_account/
notifications_account.module, line 234 - Notifications module - User subscriptions tabs
Code
function notifications_subscription_destination_subform_validate($form, &$form_state) {
notifications_include('destination.inc');
// Get destination from form and check it is ok for an anonymous user
$dest = notifications_destination_parse_submitted($form_state['values'], TRUE);
if (!empty($dest['method']) && !empty($dest['address'])) {
// Set destination field so we don't validate again send method later
$form_state['values']['destination'] = TRUE;
// Set send method in case we need some more validation for the subscription
$form_state['values']['send_method'] = $dest['method'];
}
}