The court may relieve a tenant against a forfeiture of a lease and restore him or her to his or her former estate, as in other cases provided by law, where application for such relief is made within thirty days after the forfeiture is declared by the judgment of the court, as provided in this chapter. The application may be made by a tenant or subtenant, or a mortgagee of the term, or any person interested in the continuance of the term. It must be made upon petition, setting forth the facts upon which the relief is sought, and be verified by the applicant. Notice of the application, with a copy of the petition, must be served on the plaintiff in the judgment, who may appear and contest the application. In no case shall the application be granted except on condition that full payment of rent due, or full performance of conditions of covenants stipulated, so far as the same is practicable, be first made.