H1B - 1 Year Contract on W2 basis

Hello everyone,

Is it legal to sign a contract with a consultancy who is ready to sponsor H1B (For sure I have to bear the filing cost).
The consultancy claim that I cannot leave them within that one year period. I heard it is not legal. Any inputs in this regard is much appreciated.

Thanks.

http://www.avvo.com/legal-answers/i-am-on-h1b-and-i-have-1-year-contract-with-my-emp-1570592.html

http://www.avvo.com/legal-answers/can-a-h1b-employee-be-bound-by-any-type-of-contrac-1808208.html