Can I apply to resign from my company while I am serving my service bond period?

I signed an 18 months service bond with my company and during my 17th Month (February) I sent out my resignation to my current company that I would like to leave the company in the 19th Month(April). (I have two months notice period). Although, my company got back to me in the 18th Month and said they cannot accept my resignation as I am still serving my bond period and I can only resign after my bond. Meanwhile, I have agreed to another company that I would be able to join their company in my 20th Month (May)as my current organisation didn't mention that to me that they will not be accepting my resignation for about 15 days after I applied for resignation. This is what is mentioned in the bond paper I signed initially: "In case he/she resigns from the company during the probationary period, and he/she further agrees that he/she shall be liable to pay the entire salary received by him/ her during the service in the company and the amount as aforesaid shall be deemed to be a debt by him/her to the company" At this point not sure what I can do, there isn't any buy out option available either and my company mentioned that they would be answering to any of my questions anymore. Wanted to check if what they are currently doing is legally right?