It sounds like Trump didn’t do his due diligence, at least in the 1983 case, because after almost 20 years of appeals he eventually settled.
Regarding the recent cases, as a man opposed to hiring illegal aliens, he could exceed the minimum screening requirements. He could structure a contract to specify punishments for subcontractors who hire illegal, and then enforce the penalties.