Hadithcore
Mishkat al-Masabih, 3341

Ibn ‘Umar said that when a girl with whom intercourse might be had was given as a present, or sold, or set free, it was necessary to wait till she had had a menstrual period, but that this was unnecessary in the case of a virgin. Razin transmitted.

وَعَنِ ابْنِ عُمَرَ: أَنَّهُ قَالَ: إِذَا وُهِبَتْ الْوَلِيدَةُ الَّتِي تُوطَأُ أَوْ بِيعَتْ أَوْ أُعْتِقَتْ فَلْتَسْتَبْرِئْ رَحِمَهَا بِحَيْضَةٍ وَلَا تُسْتَبْرَئُ الْعَذْرَاءُ. رَوَاهُمَا رزين

References1 variant
In-Book Reference
Book 13, Hadith 255