def clean(self):
    # ChoiceOrOtherField doesn't work with required=True
    delimiter = self.cleaned_data.get('delimiter')
    if delimiter.isdigit():
      try:
        unichr(int(delimiter))
        return int(delimiter)
      except __HOLE__:
        raise forms.ValidationError(_('Delimiter value must be smaller than 65533.'))
    if not delimiter:
      raise forms.ValidationError(_('Delimiter value is required.'))
    _clean_terminator(delimiter)
    return self.cleaned_data


# Note, struct is not currently supported.  (Because it's recursive, for example.)
dataset/ETHPy150Open cloudera/hue/apps/beeswax/src/beeswax/forms.py/CreateByImportDelimForm.clean