A contract cannot directly contradict the law; the law trumps any contracts, and contracts must be in accord with the law. However, sometimes a contract can, by how it defines a person or situation, remove the person or situation from the law's coverage. For example, in the field of labor law, normally people have to paid overtime. However, if someone is hired as a commissioned outside sales representative, the employment contract, by specifying that the person is an outside sales rep, removes him or her from overtime.There is thus no way to answer you question definitely in the abstract. If you believe you were treated inappropriately, you need to consult with an employment attorney who can evaluate the law, the contract, and your situation. Good luck.