function poll_view_voting_validate

7.x poll.module poll_view_voting_validate($form, &$form_state)
6.x poll.module poll_view_voting_validate($form, &$form_state)

Validation function for processing votes

File

drupal-7.x/modules/poll/poll.module, line 750
Enables your site to capture votes on different topics in the form of multiple choice questions.

Code

function poll_view_voting_validate($form, &$form_state) {
  if ($form_state['values']['choice'] == -1) {
    form_set_error('choice', t('Your vote could not be recorded because you did not select any of the choices.'));
  }
}