Legality of Employment Bonds in India
Generally, such types of bonds are not legally valid in India, as they are executed under coercion. Moreover, they violate Section 27 of the Contract Act, being an agreement in restraint of profession. It is also a violation of Article 19 of our Constitution, which guarantees the freedom to engage in any trade, business, or practice any profession in India.
However, if the bond is executed to recover any actual loss suffered by your employer, then it can be recovered, for example, to recover actual training expenses incurred for your training abroad. Under no circumstances should you agree to pay any amount from your own pocket. Let them recover it through court by proving the actual loss they suffered.
If they do not accept your resignation or settle your dues, please file a writ against them before the concerned High Court.