Rambam(Yesodei HaTorah Chapter 10):
This chapter discusses which signs a prophet has to perform before we believe him.
1) Any prophet who arises and says that God sent him does not have to perform a sign of the type that Moses, Elijah or Elishah did, which involved supernatural events. Instead, the sign that he has to perform is to predict the future, and we have to believe him, as it is written, "And if you say in your heart, `How shall we know the word which the Lord has not to spoken?'". Therefore, when a man suitable for prophecy comes in the Name of God, without wanting to add to or take away from, any of the commandments, but wants us to serve God properly, we do not ask him to split the sea, or to resurrect the dead, or to perform some other supernatural event, and then believe him, but we tell him to predict the future because he is a prophet, which he does, and we wait to see if what he says happens or not. Even if was wrong in only a small matter, he is a false prophet, but if all of what he said comes true, then he is believed.
2) A prophet has to be checked many times. If all his words are true then he is a prophet, as it says with respect to Samuel, "And all Israel, from Dan to Be'er-Sheva, knew that Samuel was accredited as a prophet of the Lord".
3) Enchanters and diviners also predict the future, so how do they differ from a prophet? Of what enchanters and diviners say some comes true and some does not, as it is written, "Let now the astrologers, the stargazers, the monthly prognosticators, stand up, and save you from these things shall come upon you" - it says, "from these things", and not, "from all these things", so it is possible that not all of what they said will come true, and that they were mistaken in everything, as it is written, "...that frustrates the omens of imposters, and makes diviners mad". With respect to a [true] prophet, all of what he says comes true, as it is written, "Know now that nothing shall fall to the earth of the word of the Lord", and it is also written, "The prophet that has a dream, let him tell a dream; and he that has My word, let him speak My word faithfully. What is the chaff of the wheat? says the Lord", that is to say that the words of diviners is like some chaff into which some wheat has been mixed, whereas the words of the Lord are completely true, with no falsehoods at all. This is backed up by Scripture, which says that prognosticators and diviners deceive the nations with their words, but a prophet makes known truthful matters, and we do not have to enchant or divine [to verify his words], for it is written, "There must not be found among you anyone that makes his son or his daughter pass through the fire...for these nations...The Lord your God will raise up for you a prophet from amongst you". From here we see that a prophet makes known only earthly matters, such as famine or plenty, war or peace, and similar things. Prophets even answer the needs of the one, such as when Saul had lost an item and went to a prophet to help him find it. A prophet may say what he wants provided that he does not start another religion, add a mitzvah or take one away.
4) If a prophet predicts something bad, such as that so-and-so will die, or that this year will be one of war or famine, et cetera, and his prediction did not come true, then it is not a disproof of his prophecy and we do not label him as a false prophet, for the reason that God is exceedingly merciful and [often] revokes bad decrees, so it is possible that those on whom evil had been decreed had, like the citizens of Nineveh, repented, or had had their decree suspended, as with Hezekiah. But if, however, the prophet decreed good things and his prediction did not come true, then he is definitely a false prophet, for whenever God makes a good decree, even if it is conditional, He does not revoke it. From here we see that a prophet is tested only with respect to good matters. This is what Jeremiah said in his answer to Hananiah the son of Azur, when Jeremiah was prophecising bad things and Hananiah good things: `If what I say does not come true, it is not a sign that I am a false prophet, but if what you say does not come true, it shows that you are a false prophet', for it is written, "Nevertheless, hear now this word...As for the prophet who prophecies for peace, when the word of that prophet shall come to pass, then shall it be known that the Lord has truly sent the prophet".
5) If a prophet says about another prophet that he is [indeed] a prophet, then he is assumed to be a prophet, and the prophet who said it does not have to be cross-examined. Moses vouched for Joshua, and all of Israel believed in him before he performed a sign. Similarly in the following generations: it is forbidden to doubt or debate the prophecy of a prophet who has been found to be right time and time again, or the prophecy of a prophet who has been vouched for by another prophet, and it is [also] forbidden to test him excessively or for ever [for one who tests him is like one who tests God], for it is written, "Do not test the Lord your God as you tested Him in Massah", when we said, "Is the Lord among us, or not?". Once it has become known that he is a prophet, they will believe and know that God is amongst them, and they will nor debate or doubt his words, in accordance with what is written, "...yet they shall know that there has been a prophet amongst them".