When you are hit by any attack that inflicts lightning damage, you may use a reaction to transmute the lightning energy into a shimmering shield of force that surrounds you and grants a +2 bonus to your AC. This shield of force has a number of hit points equal to the lightning damage of the triggering attack. Any attack that hits you and causes damage will cause damage to the shield instead until the shield drops to 0 hit points and disappears. (You take any excess damage when the shield drops to 0 hit points.) You may dispel the shield at will.
Note 1: The caster's reaction (this spell) is taken instead of a saving throw when the triggering attack calls for a saving throw, e.g. lightning bolt or a blue dragon's breath attack. (The wizard cannot fail the saving throw and then decide to cast this spell; it's one or the other, not both.)
Note 2: This spell has no impact on subsequent damage of the triggering effect. In the two examples above, for instance, the lightning causes damage to creatures in a line. This spell effects only the lightning energy striking the wizard and no has effect on the energy striking other creatures or objects further down range.
* - which you take when you are affected by lightning damage
The duration should be the length of time the shield lasts.
For the language for subsequent attacks, consider "Whenever you take damage, the shield takes the damage instead. If this damage reduces the shield to 0 hit points, the spell ends, and you take any remaining damage."
Having notes is a tad unseemly. For both notes try rephrasing the first sentence to "When you make a saving throw against lightning damage, you may instead use a reaction to transmute the lightning energy into a shimmering shield of force that surrounds you. You take no damage and gain a +2 bonus to your AC. This shield of force has a number of hit points equal to the lightning damage that you would have taken on a failed saving throw."
There is only 5 spells that deal lightning damage and require an attack roll, I think you can limit the ability to saving throws.