Really, why ?
If the man is suspicious of actual paternity or planning to deny paternity it is much more difficult if he marries the mother prior to the birth because traditional family law establishes paternity rights and duties via marriage, not by DNA.
This protected the peasantry from having their wives abused by overlords and being force to support the young children only to be robbed of their value when they became of working age and could contribute to the overall well being of the family by preventing the overlord from later claiming them as his own.
In most states, there is an irrebuttable presumption that a child born during the marriage is the husband’s child. Thus the husband is signing up for at least 18 years of child support.
After the baby is born, you get a quick DNA test, establish rights, and then have the wedding.