Clearly, you made a horrible mistake. take the lesson and move on. Sueing the company not only will not get your job back, but also ruin your reputation. No other company will hire you. Just say sorry, write a letter to explain that you did not understand the rule, but will take the responsibility and thanks them and wish them best.
Then move on, find another job. It is a good lesson to learn. We all make mismakes, instead of finding execuse or fighting back, forgive youself,move on, be happy again.