(a)
An action shall not be brought pursuant to Section 33501 unless the alleged grounds for noncompliance with this division were presented to the agency or the legislative body orally or in writing by any person before the close of the public hearing required by this division.
(b)
A person shall not bring an action pursuant to Section 33501 unless a person objected to the decision of the agency or the legislative body before the close of the public hearing required by this division.
(c)
This section does not preclude any organization formed after the approval of a project from bringing an action pursuant to Section 33501 if a member of that organization has complied with subdivision (b).
(d)
This section does not apply to the Attorney General.
(e)
This section does not apply to any alleged grounds for noncompliance with this division for which there was no public hearing or other opportunity for members of the public to raise those objections orally or in writing before the decision by the agency or the legislative body, or if the agency or the legislative body failed to give the notice required by law.