'Check that the value is an int or a float.'

def convert(self, value, view):

    if isinstance(value, NUMERIC_TYPES):
        return value
    else:
        self.fail(u'must    be    numeric,    not    {0}'.format(type(value).__name__), view, True)
