function simplenews_admin_settings_validate in Simplenews 5
Forms API callback; validates the settings form.
File
- ./
simplenews.module, line 2409
Code
function simplenews_admin_settings_validate($form_id, $form_values, $form, $tid = NULL) {
$field_name = 'simplenews_from_address';
// If tid is set, we're validating specific newsletter settings so update field name.
if (isset($tid)) {
$field_name .= '_' . $tid;
}
if (!valid_email_address($form_values[$field_name])) {
form_set_error($field_name, t("The sender's e-mail address you supplied is not valid."));
}
}