California Family Code Section 3044

3044.  "(a) Upon a finding by the court that a party seeking custody
of a child has perpetrated domestic violence against the other party
seeking custody of the child or against the child or the child's
siblings within the previous five years, there is a rebuttable
presumption that an award of sole or joint physical or legal custody
of a child to a person who has perpetrated domestic violence is
detrimental to the best interest of the child, pursuant to Section
3011.  This presumption may only be rebutted by a preponderance of
the evidence."

That means that if you are convicted of domestic violence, then the odds are stacked 
against you and more than likely you will lose total custody of your child.
Someone who violently attacks a partner deserves to lose custody, and despite the harsh
penalties, violence against partners continues.

Of course, not everyone who is accused of domestic violence is guilty of it.
Fabricated allegations of child abuse and domestic
violence are a common method for a partner to gain the upper hand in a contested divorce.
This, of course, hurts people are really are victims of domestic violence because
it takes valuable police time and court time to sort out the false charges
from the real ones.

Many times, the accuser can actually be the assailant in the crime because a person defending themselves can leave bruises
or marks while the perpetrator of the crime was unable to do so.  Without an attorney who has the time to understand your
case, investigate the crime, and bring forward all the evidence, a victim can not only end up with a criminal record, but
lose all parental rights.