Hazrat Imam Mahdi (as) bears the special characteristics and more from the previous prophets. He is the embodiment of their virtues and qualities. He carries their signs and is the inheritor of all that they stood for and what was revealed upon them. The following article mentions the similarity between Hazrat Zakariya (as) and Imam Mahdi (as).
Speaking to angels
Zakariya (as) was such that angels called out to him while he was engrossed in prayers.
Imam Mahdi (as) also – as mentioned before – would also be addressed by the Almighty and in the same way angels would address him in every Night of Power (Shab-e-Qadr) and Jibraeel also when he pays allegiance to Imam Mahdi would put his hand on his hand and say: Pledge of allegiance for Allah. Rawandi has narrated this report in Kharaij from Imam Baqir (as).
In the tradition of Mufaddal quoted in Beharul Anwar from Imam Sadiq (as) it is mentioned that: Jibraeel would say to Imam Mahdi (as), “O my master, I have accepted your word and your command is valid.” (Beharul Anwar volume 53 page 7)
Weeping upon Imam Husain (as)
Zakariya (as) wept upon the calamity of Aba Abdillah Husain (as) for three days, as mentioned in the report of Ahmad bin Ishaq. Imam Mahdi (as) has also wept on Imam Husayn (as) all his life and at all times as mentioned in Ziyarat Nahiya: “I lament for you day and night. I weep for you tears of blood.” (Beharul Anwar volume 101 page 320)
Saad bin Abdullah Qummi states that I inquired from Imam Mahdi (as) the explanation of kaaf haa yaa ayn saad.
He said: “These are the concealed words with which Allah had forewarned His servant Zakariya (as) and also reiterated it to Holy Prophet (sawa). Zakariya (as) had requested Allah to teach him the five (special) names and Allah had taught him those names through Hazrat Jibrael (as). When Zakariya (as) would take the names of Mohammed (sawa), Ali (as), Fatemah (sa) and Hasan (as) then the grief within him would subside. But, when he took the name of Husayn (as) his sorrow would intensify. One day he implored Allah, Oh Allah, when I take four names I find rest and inner peace but when I take the name of Husayn, then sorrow overcomes me and tears start flowing from my eyes. Allah revealed the significance of these words.
kaaf means Karbala, Haa refers to the massacre and martyrdom of the chaste progeny, yaa is for the oppressor Yazeed, ayn stands for thirst and saad is for the patience of Imam Husayn (as).
On hearing this Zakariya (as) became so anguished that he did not leave his prayer niche for three days. He did not allow anyone to come near him. Even as he wept incessantly, he kept saying,
O Allah, I am aggrieved because calamities will befall on the son of Your best creation. O Allah! Grant me a son who will be a support in my old age, who will be the light of my eyes, who will be my inheritor and my vicegerent. And then you involve me in his misery, just like how You have involved Your beloved messenger Mohammed Mustafa (sawa) in his son’s sorrow.’
Allah granted Zakariya (as) a son named Yahya (as) and then involved him in his suffering. Janabe Yahya (as) and Imam Husayn (as) were born after six months of pregnancy. (Kamaluddin volume 2 page 420)
(The above article was taken and adapted from the book Mikyalul Makarim Fee Fawaedid Dua Lil Qaem)