In Virginia:
Article VI - Judiciary All justices of the Supreme Court and all judges of other courts of record shall be residents of the Commonwealth and shall, at least five years prior to their appointment or election, have been admitted to the bar of the Commonwealth. Each judge of a trial court of record shall during his term of office reside within the jurisdiction of one of the courts to which he was appointed or elected; provided, however, that where the boundary of such jurisdiction is changed by annexation or otherwise, no judge thereof shall thereby become disqualified from office or ineligible for reelection if, except for such annexation or change, he would otherwise be qualified.
** But - you do NOT need these qualifications to be a judge in Courts NOT of record (ie: family courts) and you can sit for the Va. State Bar Exam under the Va. law readers program - no LAW "school" required.