When is Markovnikov’s rule valid?
The underlying principle of Markovnikov's Rule whenever it IS valid is that the carbocation intermediate must be as stable as possible, whether it is most stable after the initial addition of the proton or after a 1,2-hydride shift or 1,2-alkyl shift. Always ask yourself,
"is this carbocation stable enough, or is there a possible shift or conjugation to account for to achieve a more stable carbocation?"
Perhaps a better question to ask would be, "When is Markovnikov's Rule NOT valid?".
If one were to take the common description of the "rule" and say that the carbon with more protons gets another one, it fails to fully describe the reaction properly when the aforementioned 1,2-hydride shift or 1,2-alkyl shift occurs because the second atom in a diatomic molecule that is part of the addition reaction is not always added to the carbon directly adjacent to the one with the most protons.
This type of exception with the carbocation intermediate occurs when, for example, an alkyl group or proton is two carbons away ("carbon C", let's say) from the carbon ("carbon A", let's say) with the most protons, or even when a double bond is present between the carbon adjacent to carbon A, and carbon C (resonance stabilization causes the pi bond to shift).
If you want to read up on Markovnikov's Rule, either read about it further in your book, or read about it here: