She could have had a civil wedding with the fancy dress, and the reception I'm sure her parents paid dearly for, then after the baby was born, gotten married in a small Church ceremony, where the Sacrament would be valid
Too many priests couldn't care less about such things.
Many people get married in the church because church buildings make good backgrounds for the photos.
Not being Catholic, I may be wrong about this - but what if the couple was already engaged but moved up the wedding to take care of the surprise? I've had discussions with fellow, um, children who were guests at their parents' weddings and we all agree, we're glad they got married then and didn't wait... every couple I know who started off that way, would never say their marriage is less valid than anyone else's.
My mother always said that first babies come whenever they want, second babies take nine months. But I don't think if I were in that sort of spot, I'd be wearing a dress to show off.... come on, it doesn't take that long to plan a wedding, you can do it before the baby's showing.
Really... She can't be married in the church while pregnant but she can after the baby is born?