(a) Any person charged with a bailable offense may, before a magistrate authorized to admit the person to bail, be ordered released pending trial on the person’s personal recognizance or upon the execution of an unsecured appearance bond in an amount specified by the magistrate. If the magistrate orders that the person be released pending trial, then the magistrate shall impose the least restrictive conditions of release that will reasonably ensure the appearance of the person as required and the safety of the community.
(b) In determining under subsection (a) whether or not a defendant shall be released, and if so, the least restrictive conditions of release that will reasonably ensure the appearance of the defendant as required and the safety of the community, the magistrate must consider any available results of a validated pretrial risk assessment conducted regarding the defendant for use in the jurisdiction and the defendant’s financial resources. In making this determination, the magistrate may also consider:

(1) The defendant’s length of residence in the community;
(2) The defendant’s employment status;
(3) The defendant’s prior criminal record, including prior releases on recognizance or bail;
(4) Whether, at the time of being charged with the offense, the defendant was on release pending trial, sentencing, or appeal in connection with another offense;
(5) The nature of the offense, the apparent probability of conviction, and the likely sentence, insofar as these factors are relevant to the risk of nonappearance;
(6) Any substance use or mental health issues that would be better addressed in a community-based treatment program; and
(7) Any other factors indicating the defendant’s ties to the community or bearing on the defendant’s risk of willful failure to appear.
(c) Any person charged only with a violation of § 55-50-504 whose driving privilege was cancelled, suspended, or revoked under § 40-24-105 solely because of a failure to pay litigation taxes, court costs, or fines assessed as a result of the disposition of any offense under the criminal laws of this state, and who does not have a prior conviction for failure to appear under § 39-16-609 within the previous ten (10) years, must be ordered released pending trial on the person’s personal recognizance or upon the execution of an unsecured appearance bond in an amount specified by the magistrate.