Check your passport conditions before travelling to Bali
Indonesian law (PERATURAN MENTERI HUKUM DAN HAK ASASI MANUSIA REPUBLIK INDONESIA NOMOR 44 TAHUN 2015 TENTANG TATA CARA PEMERIKSAAN MASUK DAN KELUAR WILAYAH INDONESIA DI TEMPAT PEMERIKSAAN IMIGRASI PASAL 36) requires that travellers to Bali have their travel documents in good order.
Like many countries, Indonesia requires at least six months validity remaining on passports for visitors entering the country. Also ensure there is no damage to your passport. Conditions that may constitute damage requiring you to replace your passport include water damage, a significant tear, unofficial markings on the data page, missing or torn out visa pages, a hole punch, or other wear and tear.
Airlines are subject to hefty fines if they allow someone to board and travel into Indonesia and then the person is rejected due to the condition of their passport.