Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:68:50

And his Lord chose him and made him of the righteous.  

But his Lord chose him, for prophethood, and made him one of the righteous, the prophets.
القرآن:٦٨:٥٠

فَاجْتَبَاهُ رَبُّهُ فَجَعَلَهُ مِنَ الصَّالِحِينَ  

{فاجتباه ربه} بالنبوة {فجعله من الصالحين} الأنبياء.