Amr bin Dinar narrates from Ibn Abi Mulaykah (may Allah have mercy on him) that he wrote to Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) asking about the testimony of children. He wrote in reply that Allah Almighty says: 'from among those whom you approve of as witnesses' [Surah al-Baqarah: 282]. "These are not approved witnesses, so their testimony is not valid."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 20610