An action to determine the validity of the assessment, bonds, contract, improvement or acquisition may be brought by the legislative body or by the contractor pursuant to Chapter 9 (commencing with Section 860) of Title 10 of Part 2 of the Code of Civil Procedure. For such purpose an improvement or acquisition shall be deemed to be in existence upon its authorization and an assessment upon its confirmation. Notwithstanding any other provisions of law, the action authorized by this section shall not be brought by any person other than the legislative body or the contractor, nor except when permitted by Section 10400 shall the action be brought after the date fixed for the beginning of work.