RCW 9A.16.100 Use of force on children - "The The following actions are presumed unreasonable when used to correct or restrain a child: (1) Throwing, kicking, burning, or cutting a child; (2) striking a child with a closed fist; (3) shaking a child under age three; (4) interfering with a child's breathing; (5) threatening a child with a deadly weapon; or (6) doing any other act that is likely to cause and which does cause bodily harm greater than transient pain or minor temporary marks. The age, size, and condition of the child and the location of the injury shall be considered when determining whether the bodily harm is reasonable or moderate. This list is illustrative of unreasonable actions and is not intended to be exclusive."
So did you break the law? it's unclear on the facts given, for instance whether the "welts" were more than minor and temporary, and the age/size/condition of the child is unknown. However, the policy portion of that statute states, "Any use of force on a child by any other person is unlawful unless it is reasonable and moderate and is authorized in advance by the child's parent or guardian for purposes of restraining or correcting the child." So if the other parent doesn't agree with using physical punishment, you need to review your parenting plan to see what it says about who gets to make the decisions about the child's upbringing.
If you need help learning better techniques for parenting without violence, there are free resources available: http://www.parenttrust.org/index.php?page=fhl
I agree with the previous attorney post, and would add that every situation is different because every family is different and every child is different. Whether it is illegal or not is not the question. The father is asking the court to rule on custody and, generally, custody and parenting decisions are based on the best interests of the child. You need to retain an attorney for advice and to represent you in court before this spirals out of your control.
This answer does not create an attorney-client relationship and is intended to be a general statement of legal principles only. It should not be relied upon for any specific action. Please seek the advice of a qualified local attorney to review your specific case.
Sign up to receive a 5-part series of useful information and advice about child custody law.