function hubspot_admin_settings_validate in HubSpot 7.2
Same name and namespace in other branches
- 6.2 hubspot.admin.inc \hubspot_admin_settings_validate()
- 6 hubspot.admin.inc \hubspot_admin_settings_validate()
- 7.3 hubspot.admin.inc \hubspot_admin_settings_validate()
- 7 hubspot.admin.inc \hubspot_admin_settings_validate()
Form validation handler for hubspot_admin_settings().
Ensures that the debug email address provided is valid if debugging is enabled.
File
- ./
hubspot.admin.inc, line 112 - Provides admin settings page to adjust HubSpot API key, debugging settings, JavaScript embedding, and form submission settings.
Code
function hubspot_admin_settings_validate($form, &$form_state) {
if ($form_state['values']['hubspot_debug_on'] && !valid_email_address($form_state['values']['hubspot_debug_email'])) {
form_set_error('hubspot_debug_email', t('You must provide a valid email address.'));
}
}