def add_field(self, field):
        """Add a field.

        :param field: Field to add
        :raise: ValueError if `field` is not an instance of `BaseField`.

        """
        if not isinstance(field, fields.BaseField):
            raise ValueError('Argument "field" must be an instance of '
                             'BaseField')
        self.fields.add(field.name, field)
Add a field.

        :param field: Field to add
        :raise: ValueError if `field` is not an instance of `BaseField`.

        
robobrowser/forms/form.py