'Set an item.
Only attributes accepted by GetValidator and values that validate
with the validator returned from GetValidator are allowed to be set
in this dictionary.
Args:
key: Name of item to set.
value: Items new value.
Raises:
ValidationError: when trying to assign to a value that does not exist.'

def __setitem__(self, key, value):

    dict.__setitem__(self, key, self.GetValidator(key)(value, key))
