I thought this was going to be a case where it's not explicitly spelled out in the constitution, so it's not expressly illegal unless a state makes it so. But no, corporal punishment has been codified to be expressly legal in some states!
Can you imagine fighting for the right to legally beat a child? Not even your own child, but someone else's?
Perhaps it's mostly not used. I'm not sure because I went to school in New Jersey where it's outlawed even in private schools.
[0] https://en.wikipedia.org/wiki/School_corporal_punishment_in_...