Boyfriend pulled our toddlers hair

Our almost 16month old has been pulling my hair occasionally and hitting. He’s been doing it for a while and I just tell him no and be stern about it and try to redirect him. We were just sitting in the living room and my toddler came up behind me and pulled my hair. I grabbed his hand and told him no and then my boyfriend pulled on his hair and he immediately started crying. I instantly grabbed my baby and consoled him and my bf said he didn’t even pull it that hard. I’ve been very very clear with him from the beginning that I will not tolerate any form of physical punishment and if he ever lays a hand on him to spank or otherwise, I will be leaving. Like he doesn’t understand the harm it does, and I’ve tried to tell him but he doesn’t remember. I don’t know what to do. I can’t help but feel that this is the sort of situation that only gets worse as time goes on, but there’s no way to be sure. Is it possible to successfully raise a child with such differing opinions on this topic?

Edit: I genuinely did not expect this many responses. I got very sick with the flu shortly after posting this and every time I go on my phone it makes me nauseas, so I probably won’t be able to read all the responses right away. To answer a common question I saw, yes it is the baby dad. I feel like a lot of you are saying it is abuse to pull a toddlers hair, and I suppose that’s where I wanted to get clarity because I feel like it could go either way, and it seems like a pretty definitive split on opinions.