If a person, having had a child, shall afterwards intermarry with the mother or father, such child if recognized by both of them, as their own child, jointly or separately, before or after marriage, shall be deemed legitimate.
The issue of marriages prohibited by law, deemed null or void or dissolved by a court shall nevertheless be legitimate.
Va. Code § 20-31.1