diff --git a/src/spdx/validation/external_package_ref_validator.py b/src/spdx/validation/external_package_ref_validator.py
index 7be94f6..bff504d 100644
--- a/src/spdx/validation/external_package_ref_validator.py
+++ b/src/spdx/validation/external_package_ref_validator.py
@@ -11,6 +11,8 @@
 import re
 from typing import List, Dict
 
+import uritools
+
 from spdx.model.package import ExternalPackageRef, ExternalPackageRefCategory, CATEGORY_TO_EXTERNAL_PACKAGE_REF_TYPES
 from spdx.validation.uri_validators import validate_url, validate_uri
 from spdx.validation.validation_message import ValidationMessage, ValidationContext, SpdxElementType
@@ -75,7 +77,7 @@ def validate_external_package_ref(external_package_ref: ExternalPackageRef, pare
         return []
 
     if reference_type == "swid":
-        if validate_uri(locator) or not locator.startswith("swid"):
+        if not uritools.isuri(locator) or not locator.startswith("swid"):
             return [ValidationMessage(
                 f'externalPackageRef locator of type "swid" must be a valid URI with scheme swid, but is: {locator}',
                 context)]
diff --git a/src/spdx/validation/uri_validators.py b/src/spdx/validation/uri_validators.py
index 701ec3c..3033e04 100644
--- a/src/spdx/validation/uri_validators.py
+++ b/src/spdx/validation/uri_validators.py
@@ -38,7 +38,7 @@ def validate_download_location(location: str) -> List[str]:
 
 def validate_uri(uri: str) -> List[str]:
     if not isabsuri(uri):
-        return [f"must be a valid URI specified in RFC-3986, but is: {uri}"]
+        return [f"must be a valid URI specified in RFC-3986 and must contain no fragment (#), but is: {uri}"]
     else:
         split = urisplit(uri)
         if split.scheme is None:

diff --git a/tests/spdx/validation/test_creation_info_validator.py b/tests/spdx/validation/test_creation_info_validator.py
index 7ad38e5..0fb4fc7 100644
--- a/tests/spdx/validation/test_creation_info_validator.py
+++ b/tests/spdx/validation/test_creation_info_validator.py
@@ -32,7 +32,7 @@ def test_valid_creation_info():
           (creation_info_fixture(data_license="MIT"), "SPDXRef-DOCUMENT",
            'data_license must be "CC0-1.0", but is: MIT'),
           (creation_info_fixture(document_namespace="some_namespace"), "SPDXRef-DOCUMENT",
-           "document_namespace must be a valid URI specified in RFC-3986, but is: some_namespace"),
+           "document_namespace must be a valid URI specified in RFC-3986 and must contain no fragment (#), but is: some_namespace"),
           ])
 def test_invalid_creation_info(creation_info_input, expected_message, spdx_id):
     validation_messages: List[ValidationMessage] = validate_creation_info(creation_info_input)
diff --git a/tests/spdx/validation/test_uri_validators.py b/tests/spdx/validation/test_uri_validators.py
index a2a5822..a692ee8 100644
--- a/tests/spdx/validation/test_uri_validators.py
+++ b/tests/spdx/validation/test_uri_validators.py
@@ -99,7 +99,7 @@ def test_valid_uri(input_value):
 def test_invalid_uri(input_value):
     message = validate_uri(input_value)
 
-    assert message == [f"must be a valid URI specified in RFC-3986, but is: {input_value}"]
+    assert message == [f"must be a valid URI specified in RFC-3986 and must contain no fragment (#), but is: {input_value}"]
 
 
 @pytest.mark.parametrize("input_value", ["://spdx.org/spdxdocs/spdx-tools-v1.2-3F2504E0-4F89-41D3-9A0C-0305E82..."])

Validation: No `#` in DocumentNamespace
The namespace of the document must not contain any `#`. This has been overlooked so far.
tests/spdx/validation/test_creation_info_validator.py::test_invalid_creation_info[creation_info_input2-SPDXRef-DOCUMENT-document_namespace tests/spdx/validation/test_uri_validators.py::test_invalid_uri[/invalid/uri] tests/spdx/validation/test_uri_validators.py::test_invalid_uri[http//uri] tests/spdx/validation/test_uri_validators.py::test_invalid_uri[http://some#uri] tests/spdx/validation/test_uri_validators.py::test_invalid_uri[some/uri] tests/spdx/validation/test_uri_validators.py::test_invalid_uri[some
tests/spdx/validation/test_creation_info_validator.py::test_valid_creation_info tests/spdx/validation/test_creation_info_validator.py::test_invalid_creation_info[creation_info_input0-SPDXRef-doc-spdx_id tests/spdx/validation/test_creation_info_validator.py::test_invalid_creation_info[creation_info_input1-SPDXRef-DOCUMENT-data_license tests/spdx/validation/test_uri_validators.py::test_valid_url[https://some.url] tests/spdx/validation/test_uri_validators.py::test_valid_url[https://spdx.org/spdxdocs/spdx-tools-v1.2-3F2504E0-4F89-41D3-9A0C-0305E82...] tests/spdx/validation/test_uri_validators.py::test_valid_url[http://some.url] tests/spdx/validation/test_uri_validators.py::test_valid_url[http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz] tests/spdx/validation/test_uri_validators.py::test_invalid_url[:::::] tests/spdx/validation/test_uri_validators.py::test_invalid_url[http://testurl] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[git://git.myproject.org/MyProject] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[git+https://git.myproject.org/MyProject.git] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[git+http://git.myproject.org/MyProject] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[git+ssh://git.myproject.org/MyProject.git] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[git+git://git.myproject.org/MyProject] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[git+git@git.myproject.org:MyProject] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[git://git.myproject.org/MyProject#src/somefile.c] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[git+https://git.myproject.org/MyProject#src/Class.java] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[git://git.myproject.org/MyProject.git@master] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[git+https://git.myproject.org/MyProject.git@v1.0] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[git://git.myproject.org/MyProject.git@da39a3ee5e6b4b0d3255bfef95601890afd80709] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[git+https://git.myproject.org/MyProject.git@master#/src/MyClass.cpp] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[git+https://git.myproject.org/MyProject@da39a3ee5e6b4b0d3255bfef95601890afd80709#lib/variable.rb] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[hg+http://hg.myproject.org/MyProject] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[hg+https://hg.myproject.org/MyProject] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[hg+ssh://hg.myproject.org/MyProject] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[hg+https://hg.myproject.org/MyProject#src/somefile.c] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[hg+https://hg.myproject.org/MyProject#src/Class.java] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[hg+https://hg.myproject.org/MyProject@da39a3ee5e6b] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[hg+https://hg.myproject.org/MyProject@2019] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[hg+https://hg.myproject.org/MyProject@v1.0] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[hg+https://hg.myproject.org/MyProject@special_feature] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[hg+https://hg.myproject.org/MyProject@master#/src/MyClass.cpp] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[hg+https://hg.myproject.org/MyProject@da39a3ee5e6b#lib/variable.rb] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[svn://svn.myproject.org/svn/MyProject] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[svn+svn://svn.myproject.org/svn/MyProject] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[svn+http://svn.myproject.org/svn/MyProject/trunk] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[svn+https://svn.myproject.org/svn/MyProject/trunk] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[svn+https://svn.myproject.org/MyProject#src/somefile.c] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[svn+https://svn.myproject.org/MyProject#src/Class.java] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[svn+https://svn.myproject.org/MyProject/trunk#src/somefile.c] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[svn+https://svn.myproject.org/MyProject/trunk/src/somefile.c] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[svn+https://svn.myproject.org/svn/MyProject/trunk@2019] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[svn+https://svn.myproject.org/MyProject@123#/src/MyClass.cpp] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[svn+https://svn.myproject.org/MyProject/trunk@1234#lib/variable/variable.rb] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[bzr+https://bzr.myproject.org/MyProject/trunk] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[bzr+http://bzr.myproject.org/MyProject/trunk] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[bzr+sftp://myproject.org/MyProject/trunk] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[bzr+ssh://myproject.org/MyProject/trunk] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[bzr+ftp://myproject.org/MyProject/trunk] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[bzr+lp:MyProject] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[bzr+https://bzr.myproject.org/MyProject/trunk#src/somefile.c] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[bzr+https://bzr.myproject.org/MyProject/trunk#src/Class.java] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[bzr+https://bzr.myproject.org/MyProject/trunk@2019] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[bzr+http://bzr.myproject.org/MyProject/trunk@v1.0] tests/spdx/validation/test_uri_validators.py::test_valid_package_download_location[bzr+https://bzr.myproject.org/MyProject/trunk@2019#src/somefile.c] tests/spdx/validation/test_uri_validators.py::test_invalid_package_download_location[:::::] tests/spdx/validation/test_uri_validators.py::test_valid_uri[https://some.uri] tests/spdx/validation/test_uri_validators.py::test_valid_uri[http:////some] tests/spdx/validation/test_uri_validators.py::test_valid_uri[https://spdx.org/spdxdocs/spdx-tools-v1.2-3F2504E0-4F89-41D3-9A0C-0305E82...] tests/spdx/validation/test_uri_validators.py::test_valid_uri[h://someweirdtest^?] tests/spdx/validation/test_uri_validators.py::test_valid_uri[https://some.uri