(a) Any public entity, as defined in Section 1100, the University of California, and the California State University shall specify the classification of the contractor’s license which a contractor shall possess at the time a contract is awarded. The specification shall be included in any plans prepared for a public project and in any notice inviting bids required pursuant to this code.
This requirement shall apply only with respect to contractors who contract directly with the public entity.
(b) A contractor who is not awarded a public contract because of the failure of an entity, as defined in subdivision (a), to comply with that subdivision shall not receive damages for the loss of the contract.