You are here

function user_rev_diff_user_revisions_validate in User Revision 7.2

Validation for input form to select two revisions.

File

diff/user_rev_diff.pages.inc, line 97
Menu callbacks for hook_menu().

Code

function user_rev_diff_user_revisions_validate($form, &$form_state) {
  $old_vid = $form_state['values']['old'];
  $new_vid = $form_state['values']['new'];
  if ($old_vid == $new_vid || !$old_vid || !$new_vid) {
    form_set_error('diff', t('Select different revisions to compare.'));
  }
}