In Sample App 5.0, TC Connector v2512.0.0 there appears to be an issue when adding a new Teamcenter configuration. The URL field is validated using the IsUrlRegex constant, which currently is set to:
https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)
This regex only allows public domains containing a dot (.), so valid internal URLs are rejected, for example:http://hostname:3000/tc and http://hostname:4544/tc/fms.
A working alternative that supports both internal and public URLs is:
https?:\/\/(?:[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*|localhost)(?::\d{1,5})?(?:\/[^\s]*)?
This change allows hostname-based URLs with ports and paths, which are typical for Teamcenter enterprise deployments.
Hopefully this gets updated in a future release - I had to amend it manually, and it will be overwritten with an update to the module.