The first criteria according to all the Holy Books is that God will be the Judge. If someone claims to be from Allah and he is not, then Allah will cause him to die. Allah has made it clear that he will not allow anyone to claim to be a Prophet of God, if Allah has not chosen him. The Holy Qur’an states:
And if he had forged and attributed any saying to us,
We would surely have seized him by the right hand,
And then surely we would have severed his life-artery,
And not one of you could have held Our punishment off from him.
The Holy Bible states:
That Prophet or that dreamer of dreams, shall be put to death; Because he hath spoken to turn you away from the Lord your God.
Holy Bible, Deuteronomy Chapter 13, verses 1-5
The problem with this is that everyone will die eventually. Therefore the Muslim Ulama have said that if a person is claiming to be from Allah, then as the Holy Prophet received revelation from Allah for 22-23 years (the time it took for the Holy Qur’an to be revealed) then anyone now claiming to be from Allah should receive revelation for longer than this. Our own common sense tells us that if someone is false, then Allah will cause him to die after a few years. Allah will not allow someone to keep saying that he is from Allah for over 23 years without doing anything.
Concerning Hadhrat Mirza Ghulam Ahmad, the Promised Messiah and Mahdi, he wrote down in his very first book, Brahin-e-Ahmadiyya in 1880, some of the revelations that he had already received. He continued to write down the revelations that he was receiving until his final book in 1908. Therefore he has claimed to have received revelations for over 28 years, fulfilling this criterion of the Holy Qur'an.
One thing to note here is that the Holy Qur'an is now complete, therefore no more laws can be revealed. But Allah can and does speak to men and women. It is these revelations that are being referred to here.