Surah 2, Verse 233

The mothers should suckle their babies for a period of two years for those (fathers) who wish that they should complete the suckling, in which case they should feed them and clothe them in a befitting way; but no soul should be compelled beyond capacity, neither the mother made to suffer for the child nor the father for his offspring. The same holds good for the heir of the father (if he dies). If they wish to wean the child by mutual consent there is no harm. And if you wish to engage a wet nurse you may do so if you pay her an agreed amount as is customary. But fear God, and remember that God sees all that you do.

— Quran 2:233

Quote from Quran 2:233