It is narrated from Ubayd bin Nadlah (or Nudaylah; Dawud was unsure about this) that a woman was brought to Sayyiduna Umar bin al-Khattab (may Allah be pleased with him). He (may Allah be pleased with him) said to her: Did you know that you were marrying during the 'iddah? She said: No (I did not know). He said to her husband: Did you know? He said: No, I did not know either. He (may Allah be pleased with him) said: Had you known, I would have stoned you both. He (may Allah be pleased with him) struck them with a whip, took her dowry and gave it in charity in the path of Allah. He (may Allah be pleased with him) said: Neither is her dowry valid, nor is her marriage valid. And he said: She will never be lawful for you.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب العدد / 15543