A state agency, as defined in Section 10335.7, that is subject to this code, shall not award a public works or purchase contract to a bidder or contractor, nor shall a bidder or contractor be eligible to bid for or receive a public works or purchase contract, who has, in the preceding five years, been convicted of violating a state or federal law respecting the employment of undocumented aliens.