12:25
وَ ٱسْتَبَقَ ا ٱلْ بَابَ وَ قَدَّتْ قَمِيصَ هُۥ مِن دُبُرٍ وَ أَلْفَيَ ا سَيِّدَ هَا لَدَا ٱلْ بَابِ قَالَتْ مَا جَزَآءُ مَنْ أَرَادَ بِ أَهْلِ كَ سُوٓءًا إِلَّآ أَن يُسْجَنَ أَوْ عَذَابٌ أَلِيمٌ
And they both raced to the door, and she tore his shirt from the back, and they found her husband at the door. She said, "What is the recompense of one who intended evil for your wife but that he be imprisoned or a painful punishment?"
12:26
قَالَ هِىَ رَٰوَدَتْ نِى عَن نَّفْسِ ى وَ شَهِدَ شَاهِدٌ مِّنْ أَهْلِ هَآ إِن كَانَ قَمِيصُ هُۥ قُدَّ مِن قُبُلٍ فَ صَدَقَتْ وَ هُوَ مِنَ ٱلْ كَٰذِبِينَ
[Joseph] said, "It was she who sought to seduce me." And a witness from her family testified. "If his shirt is torn from the front, then she has told the truth, and he is of the liars.
12:27
وَ إِن كَانَ قَمِيصُ هُۥ قُدَّ مِن دُبُرٍ فَ كَذَبَتْ وَ هُوَ مِنَ ٱل صَّٰدِقِينَ
But if his shirt is torn from the back, then she has lied, and he is of the truthful."
12:28
فَ لَمَّا رَءَا قَمِيصَ هُۥ قُدَّ مِن دُبُرٍ قَالَ إِنَّ هُۥ مِن كَيْدِ كُنَّ إِنَّ كَيْدَ كُنَّ عَظِيمٌ
So when her husband saw his shirt torn from the back, he said, "Indeed, it is of the women's plan. Indeed, your plan is great.