the Messenger of Allah said: "Whoever fasts Ramadan and stands (in the night prayer) for it out of faith and seeking a reward (from Allah), he will be forgiven what preceded of his sins. Whoever stands (in the night prayer) on the Night of Al-Qadr out of faith and seeking a reward (from Allah), he will be forgiven what preceded of his sins."
قَالَ رَسُولُ اللَّهِ ﷺ مَنْ صَامَ رَمَضَانَ وَقَامَهُ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ وَمَنْ قَامَ لَيْلَةَ الْقَدْرِ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ هَذَا حَدِيثٌ صَحِيحٌ