Marrying while...

If both parties are aware of the situation, and aware of their options (adoption, childlessness), then it’s really between them.

PS: I neglected to mention options such as sperm-donation in the cases of male sterility or egg-donation and surrogacy in cases of female sterility, but for various reasons, adoption and childless are less controversial for many.