Every action or other proceeding in a court not of record shall be tried according to the principles of law and equity, and when the same conflict the principles of equity shall prevail. No warrant, motion or other pleading shall be dismissed by reason of a mere defect, irregularity or omission in the proceedings or in the form of the pleadings when the same may be corrected by an order of the court. The court may direct such proceedings and enter such orders as may be necessary to correct any such defects, irregularities and omissions, and to bring about a trial of the merits of the controversy and promote substantial justice to all parties. The court may make such provisions as to costs and continuances as may be just.
Va. Code § 16.1-93