Jeremiah 29:26 Midrash

יְהוָ֞ה נְתָנְךָ֣ כֹהֵ֗ן תַּ֚חַת יְהוֹיָדָ֣ע הַכֹּהֵ֔ן לִֽהְי֤וֹת פְּקִדִים֙ בֵּ֣ית יְהוָ֔ה לְכָל־אִ֥ישׁ מְשֻׁגָּ֖ע וּמִתְנַבֵּ֑א וְנָתַתָּ֥ה אֹת֛וֹ אֶל־הַמַּהְפֶּ֖כֶת וְאֶל־הַצִּינֹֽק׃

’The LORD hath made thee priest in the stead of Jehoiada the priest, that there should be officers in the house of the LORD for every man that is mad, and maketh himself a prophet, that thou shouldest put him in the stocks and in the collar.

Read midrashic interpretation of Jeremiah 29:26: and classical rabbinic exegesis.