
First of all the bible has something to say about the age of those who are baptized. In Mark 1:5 the scripture says, there went out unto him all the country of Judea, and all they of Jerusalem; and they were baptized of him in the river Jordan, confessing their sins. Notice that those who were baptized by John (1) heard his preaching and (2) were able to confess their sins. This says they were old enough to understand John's preaching and to confess their sins. In Mark 16:16 Jesus said, He that believeth and is baptized shall be saved; but he that believeth not shall be damned. Believers were to be baptized. This is emphasize again in Matthew 28:20 where Jesus commands his apostles to baptize those who believe, Teaching them to observe all things whatsoever I have commanded you: and, lo, I am with you alway, [even] unto the end of the world. Amen.
In Acts 2:38 the scriptures teach that those who repented were baptized. Here we see that one must be a penitent believer to be baptized. In Acts 8:12, again those who believed were baptized, But when they believed Philip preaching the things concerning the kingdom of God, and the name of Jesus Christ, they were baptized, both men and women. In Acts 8:37 the Eunuch asked Philip what kept him from being baptized and Philip responded, .... If thou believest with all thine heart, thou mayest. And he answered and said, I believe that Jesus Christ is the Son of God. And he commanded the chariot to stand still: and they went down both into the water, both Philip and the eunuch; and he baptized him.
In every case of conversion the gospel was preached, people believed it, repented of their sins, before they were baptized. So one must be capable of believing and repenting of their sins to be baptized as authorized by the New Testament.