Both creator and package names may have spaces in the real world. Not being able to enter them feels strange, even though I understand why. There should be some advice on how to handle that so it's consistent, otherwise a popular software can end up with
"Dependency_track"
"DependencyTrack"
"Dependency-Track"
An alternative would be to accept spaces in name and always translate them into the same character when generating a Swid to enforce consistency.