Since the year 2000, the Basic Law of Germany was adjusted. The children do now have the right to be treated without corporal punishment. This limits the rights of the parents to raise and educate their children as they wish. The §1631 of the BGB states clearly:” Children have the right to be educated without violence. Corporal punishment, mental injuries and other degrading measures are inadmissible.” You are only allowed to use violence to protect a child from immediate danger, for example if the child threatens to run across a busy road.