My question involves paternity law for the State of: VA

if a mother is married at the time of a child's birth and the husband is not the biological father (and bio dad isn't there), does the hospital tell her that she must use her married name for the child and that if I (bio dad) wasn't there then NO father would be listed on the birth certificate (even though she is married)? if this is true, is her husband still the LEGAL father?