More information is needed here.  Did the Judge actually use the word "spank" because that word is intentionally left out of the Clifornia Penal Code that deals with child abuse.  Parents maintain a right to discipline their children "reasonably" in the manner they see fit under California Law.  I would speak with an attorney.  Good luck.