def validate(self, value):
        try:
            value = [datetime.datetime.strptime(range, '%Y-%m-%d').date()
                     for range in value.split(' to ')]
            # if " to " is missing, fail validation
            # sqlalchemy's .between() will not work if end date is before start date
            if (len(value) == 2) and (value[0] <= value[1]):
                return True
            else:
                return False
        except __HOLE__:
            return False
dataset/ETHPy150Open flask-admin/flask-admin/flask_admin/model/filters.py/BaseDateBetweenFilter.validate