Notwithstanding any other provision of law, a public officer who is a minor shall have the rights and liabilities of an adult, both civil and criminal, with regard to his official duties, and a candidate for nomination or election to public office who is a minor shall have the rights and liabilities of an adult, both civil and criminal, with regard to his activities as a candidate.