The Messenger of Allah ﷺ used to encourage standing in prayer during Ramadan without making it a strict obligation. He would say, "Whoever stands in prayer during Ramadan out of faith and seeking reward, his previous sins will be forgiven."
حدثنا عبد الله حدثنا أبي حدثنا عبد الرزاق حدثنا معمر وعبد الأعلى عن معمر عن الزهري عن أبي سلمة
كان رسول الله ﷺ يرغب في قيام رمضان من غير أن يأمرهم بعزيمة فيقول من قام رمضان إيمانا واحتسابا غفر له ما تقدم من ذنبه
Its chain of transmission is sahih. Muslim (1:210) narrated it from Abd bin Humayd, from Abdul-Razzaq, with this same chain, with an addition at the end. Malik likewise narrated it in Muwatta (pp. 113-114) from Ibn Shihab, from Abu Salama, with the same addition found in Muslim. See also its meaning in part, in what has already passed at 7278 and 7279.Nasai (1:299) narrated it through the route of Abu Bakr bin Abu Shayba, from Abdul-Ala, from Mamar, with this same chain, but only its first half, and he made its second half into the hadith that has already passed at 7768, "When Ramadan begins, the gates of mercy are opened," and so on.