How would you feel if your SO did this?

So I recently started a job and there's a guy that's married and has a baby that's given me compliments multiple times calling me pretty or telling me I look good today. It doesn't bother me but all I could think of is, if that were my husband, I'd be pissed! Is this totally acceptable or should he not be doing this!?