def METHOD_NAME(self, field):
    project_name = field.data
    if project_name in self._project_factory:
        raise wtforms.validators.ValidationError(
            _("This project name is already in use")
        )