Upon conviction for the violation of any ordinance, the court trying the case may require bond of the person so convicted with proper security in the penalty of not more than $5,000, conditioned not to violate the ordinance for the breach of which he has been convicted for the period of not more than one year.
Va. Code § 15.2-1430