Business and Professions Code § 9852
ARTICLE 4. Offenses Against the Chapter
No person required to have a valid registration under the provisions of this chapter shall have the benefit of any lien for labor or materials or the right to sue on a contract for repairs or installation done by such individual, unless he or she has such a valid registration.