My 15-month old is constantly doing the opposite of what I say, on purpose. Maybe it is just the age, but she seems to have a defiant streak.

One example of her behavior: She has become a hitter. She will go up to our dog and smack him HARD! She will hit him with toys, her sippy cup....whatever is in her hand. She knows what I mean when I say "pet him nice," but no matter how often I say "Don't hit! Pet him nice!" she just keeps doing it. I will say "no, we don't hit," and then she will look at me with a mischievous grin, smack the dog, and then run away laughing. She has absolutely no interest in obeying me.

How do I correct this? I have no idea how to discipline at this age.

ETA: this is just one example of her behavior lately.