def add_error(self, error, field=None):
        seq = self.errors.get(field)
        if seq is None:
            seq = self.errors[field] = widgets.ErrorList(self)
        seq.append(error)
Adds an error to a field.
dataset/ETHPy150Open mitsuhiko/fungiform/fungiform/forms.py/FormBase.add_error