That's fine, so long as they won enough support to be the primary challenger against the GOP candidate. Otherwise you're wasting your vote and helping the Republican win. Sometimes you have to swallow your pride and vote for a bad candidate so that the even worse one doesn't win.
Edit: A lot of people don't like this comment but none of you are telling me what the alternative is besides not voting (which isn't happening because I vote in every election and you should too).