'Validate options.
Returns:
Original value for provided alias.
Raises:
ValidationError: when value is not one of predefined values.'

def Validate(self, value, key):

    if (value is None):
        raise ValidationError('Value    for    options    field    must    not    be    None.')
    value = str(value)
    if (value not in self.options):
        raise ValidationError(("Value    '%s'    for    %s    not    in    %s." % (value, key, self.options)))
    return self.options[value]
