same validation function for demand votes and comment votes