Question: do lanthanides have valence electrons?
Answer: Since the lanthanide metals (except europium and ytterbium) have three valence electrons, in order to form dihalides in whcih lanthanides are in the divalent state there must be a change from the trivalent state to the divalent by removing an electron from the valence band and putting it into the 4f level.