Everyone has the right to defend themselves using a reasonable amount of force so therefore you should never hurt anyone more than you have to, otherwise you will become the aggressor.

Whilst sometimes as a last resort using violence can be necessary for your own self protection or the protection of others, using violence is generally not a very effective way to encourage others not to be violent.

Teaching non violence needs to be done primarily by example. Same as you can not teach children effectively not to have bad manners, be disrespectful, smoke, drink alcohol or take drugs whilst doing so yourself.