What code did Mayella break?

Mayella Ewell in To Kill a Mockingbird broke the social and moral code of her town by tempting a negro man. She tried to seduce Tom Robinson, but he resisted. Her father looked in the window and saw what she was doing, so he came inside and beat her for it. She knew that she'd be shunned for breaking this unwritten code, so she claimed that Tom had raped her.