I did the same thing. Because babies grab hair. And it hurts. Haha.
When my son was a toddler he'd come up behind me and rip hair out of my head, roots and all, then he'd eat it. I would give him a firm no and waited it out, but when it got to be a while and he wouldn't stop I talked the Doctor. She ran a blood test to make sure he wasn't lacking something he needed. He was OK. She was afraid he'd get hair ball's. It hurt so bad, I was nervous when he'd come near me. I decided at thAt point to cut my hair very short. I also put more product in it, so maybe the taste or sticky texture would turn him off. It did help, he couldn't grasp enough to pull anymore. He also would pull at the carpet and put thAt in his mouth. The carpet was old and gross so I ripped it out. My husband had some surprises that day. He was actually very impressed that I could rip carpets out by myself.