My salary got deducted

Hi Sir, I was serving my notice period in my last company. On the last working day, I was informed that my salary will be deducted as I took more leaves then I could have in my notice period. I wasn't informed of any such rule beforehand. I never received a mail from the HR or any department. Even the company portal that we use to apply leaves was not showing any sort of warning, that I was exceeding my leaves limit. I took leaves and applied the same on the portal and on the last day I was informed that I exceeded the limit thus my salary will get deducted. I don't think it was fair. I tried to reason with my employer but they showed me the company's policy and said that they could do nothing on the matter. I just asked one question, "if the company's leave portal is not following your policy, how am I suppose to follow the same?". They said there is some technical constraint and we will inform the future employees over mail to avoid confusion. But this was no help for me. I strongly feel that injustice has been done to me. I know this is not a big deal. But in my perception injustice is injustice no matter how small or big it is. Please guide me if it will be possible for me to sue my employer on this or not? Regards, Tanmai Sharma