A parent, guardian, teacher or other person having the lawful custody of a child may use moderate or reasonable force as a corporal punishment in the restraint of such child; and only the use of unnecessary and excessive force would make one guilty of an offense.

The chastisement of a child by its parent, the correction of an apprentice or scholar by the master, the punishment of a criminal by the proper officer or the keepers of alms-houses and asylums for the poor, is not unlawful when it appears that the chastisement was moderate and reasonable or that the criminal was punished in the manner appointed by law.16

Also a school teacher inflicting corporal punishment on a pupil for disobeying the lawful rules of his school is not guilty of assault and battery if the punishment be human and reasonable.17