def pre_add(self, item):
        """
        Override this, will be called before add.
        If an exception is raised by this method,
        the message is shown to the user and the add operation is aborted.
        """

        Override this, will be called before add.
        If an exception is raised by this method,
        the message is shown to the user and the add operation is aborted.
        
flask_appbuilder/baseviews.py