function sendgrid_integration_admin_validate in SendGrid Integration 7
Validation function for admin settings.
_state
Parameters
$form:
1 string reference to 'sendgrid_integration_admin_validate'
- sendgrid_integration_admin in ./
sendgrid_integration.admin.inc - Provides Settings Form.
File
- ./
sendgrid_integration.admin.inc, line 72
Code
function sendgrid_integration_admin_validate($form, &$form_state) {
// Check for API secret key. If missing throw error.
if (empty(variable_get('sendgrid_integration_apikey', '')) && empty($form_state['values']['sendgrid_integration_apikey'])) {
form_set_error('authentication][sendgrid_integration_apikey', t('You have not stored an API Secret Key.'));
}
}