Any action or proceeding to attack, review, set aside, void or annul a determination, finding, or decision of a public agency, made as a result of a proceeding in which by law a hearing is required to be given, evidence is required to be taken and discretion in the determination of facts is vested in a public agency, on the grounds of noncompliance with the provisions of this division shall be in accordance with the provisions of Section 1094.5 of the Code of Civil Procedure.
In any such action, the court shall not exercise its independent judgment on the evidence but shall only determine whether the act or decision is supported by substantial evidence in the light of the whole record.