There are two conditions for establishing prohibition through breastfeeding
➊ The milk was given before the age of two years: as the Qur’an mentions the duration of breastfeeding as follows.
حَوْلَيْنِ كَامِلَيْنِ
“Two full years.”
➋ The milk was given in five separate feedings: as Aisha (may Allah be pleased with her) says:
“It was revealed in the Noble Qur’an that ten feedings establish prohibition, but then this ruling was abrogated by five feedings, and then prohibition was established by five feedings only, until the Messenger of Allah ﷺ passed away and the matter remained like that.”
(Ahmad (may Allah have mercy on him), al-Shafi’i (may Allah have mercy on him)) hold this view.
(Abu Hanifa (may Allah have mercy on him)) The duration of breastfeeding is two and a half (2.50) years (his evidence is that the Qur’an says:
وَحَـمْلُـهٝ وَفِصَالُـهٝ ثَلَاثُوْنَ شَهْرًا
“And whether little milk was given (even once) or more, prohibition will be established. Because the Qur’an is general:
وَأُمَّهَتُكُمُ اللَّاتِي أَرْضَعْنَكُمُ
“And your mothers who nursed you.”
(Preponderant view) The first position is the preponderant one.