All contests of elections provided for in this article must be commenced within 20 days after the result of the election is declared, except as in this article otherwise provided; and at the time of commencing such contest and the filing of the statement in writing, the party contesting must give security for the cost of such contest, to be filed and approved as provided in this article.
Ala. Code § 17-16-49 (1975)