TC Connector v2512.0.0 / Sample App 5.0 – Configuration URL validation issue - Mendix Forum

TC Connector v2512.0.0 / Sample App 5.0 – Configuration URL validation issue

0

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.

 

2026-01-23_09-21-25.jpg

 

2026-01-23_09-21-25.jpg

 

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.

Posted
0 comments