question validation logic