function heartbeat_messages_add_validate in Heartbeat 6.4
Validate function to maintain and administer heartbeat messages.
File
- ./
heartbeat.admin.inc, line 908 - Admnistration tasks for heartbeat.
Code
function heartbeat_messages_add_validate($form, &$form_state) {
$name = $form_state['values']['message_id'];
// View name must be alphanumeric or underscores, no other punctuation.
if (preg_match('/[^a-zA-Z0-9_]/', $name)) {
form_error($form['message_id'], t('Heartbeat template name must be alphanumeric or underscores only.'));
}
}