Period sex

I'm on my period & I had sex with my boyfriend. It was the first time I ever did anything while on it & now I'm stopping my period & it's barely been the 5th day. I always last a whole week exactly. Is having sex while on your period bad ?