I'm only aware of one case challenging it, and it was a pretty specific context (a 1982 case [1] in which tenured professors challenged their university's ban on taking a second full-time job, which was upheld).
In general though these kinds of restrictions tend to be upheld unless there is a state law against them. There have occasionally been proposals that a robust "right to work" law should generally protect the right to form new contracts selling one's labor to a willing buyer, and void any exclusivity contracts with other parties that would interfere with that right. But in practice all states that I know of with a "right to work" law have adopted a much more limited version of the right, which only voids very specific kinds of exclusivity contracts (relating to employer–union contracts). Some states separately void noncompete agreements under a related principle.
I'm not aware of any state voiding contracts relating to exclusive employment with the employer for the duration of the contract, at least for full-time, salaried employees.
[1] http://scholar.google.com/scholar_case?case=1733979708568541...