Valmiki Ramayana Ayodhya Kanda Sarga 12 Shloka 44
Original Shlokaसागरस्समयं कृत्वा न वेलामतिवर्तते। समयं माऽनृतं कार्षीः पूर्ववृत्तमनुस्मरन्।।2.12.44।।
1 source checked for this shloka
सागरः ocean, समयम् vow, कृत्वा having made, वेलाम् the shore, अतिवर्तते does not cross, पूर्ववृत्तम् history of the earlier kings, अनुस्मरन् recollecting, समयम् the vow, अनृतम् false, मा कार्षीः do not make.
Having made the vow (to the gods), the ocean does not advance beyond the shore. Recollect the history of the earlier kings and do not make the vow false.