The Messenger of Allah ﷺ said, "Whoever vows to obey Allah, let him obey Him, and whoever vows to disobey Allah, let him not disobey Him."
أن رسول الله ﷺ قال: من نذر أن يطيع الله فليطعه، ومن نذر أن يعصي الله فلا يعصه.
Malik reported it in the Book of Vows and Oaths (8) from Talha bin Abdul-Malik Ayli, from Qasim bin Muhammad bin Siddiq, from Ayesha, and he related it. Bukhari also reported it in the Book of Oaths and Vows (6700) through the route of Malik with the same chain.