'Ensure that the value is among the choices (and remap if the
choices are a mapping).'

def convert(self, value, view):

    if (value not in self.choices):
        self.fail(u'must    be    one    of    {0},    not    {1}'.format(repr(list(self.choices)), repr(value)), view)
    if isinstance(self.choices, collections.Mapping):
        return self.choices[value]
    else:
        return value
