The footballing law that governs the act falls under Law 12 of the basic category of 'fouls and misconduct' as is further sub categorized into 'careless, reckless, using excessive force'..
“Reckless” means that the player has acted with complete disregard to the danger to, or consequences for, his opponent. A player who plays in a reckless manner must be cautioned.
“Using excessive force” means that the player has far exceeded the necessary use of force and is in danger of injuring his opponent.. A player who uses excessive force must be sent off."
Well deserved red card for Pepe. If Alves didnt avoid that tackle his leg would be most likely broken... Do we really need hard injuries in football just to prove red card was legit?