function hubspot_admin_settings_validate in HubSpot 7
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.2 hubspot.admin.inc \hubspot_admin_settings_validate()
Validation for hubspot_admin_settings form. Ensure that the debug email address provided is valid if debugging is to be enabled.
File
- ./
hubspot.admin.inc, line 56 - Provides admin settings page to adjust HubSpot API key, debugging settings, and JavaScript embedding.
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.'));
}
}