Question
If the imam of the mosque is not present at the time of the congregation, and those present include bearded but ignorant people, while there is one educated man present who has no beard, is the prayer behind this beardless man valid?
Answer
For the prayer, one should appoint as imam a person who knows the essential rulings of the prayer and who has memorized the most Quran among all the followers. If everyone present has memorized roughly the same amount of Quran, then the person who is the most knowledgeable in the knowledge of the Shariah should be made imam. If everyone is equal in this knowledge as well, then the eldest person is the one entitled to lead the prayer.
If by “beardless” what is meant is that his beard has not yet grown and he is close to puberty, while he has greater knowledge of the rulings of the Shariah, then in such a case he is the one who deserves to be imam, because puberty is not a condition for leading the prayer, as is established by the hadith of Amr ibn Salamah al-Muradi (may Allah be pleased with him).
However, if by “beardless” what is meant is that the person shaves his beard, then such a person should not be made imam, because he is a transgressor (fasiq), and leading the prayer by such a person is disliked.