client side validation for vote