You should never hit children, no matter the circumstances. They never consented to your rules, and never chose to have you as your parent. So if you punish* them for not following your rules, it's an immoral action.
* You are allowed to punish them by withholding giving them things, but you may not take things from them, because that is theft. Also you can not physically force them to do anything or hurt them physically, because that is violence.
RE: Judge not you silly girl (Featuring author @naomi-louise)