I've setup the plugin and I got no output on the validation. Looking at my browser's console I can see the following:
XMLHttpRequest cannot load http://server//descriptor/hudson.plugins.validating_string_paramete…0in%20the%20N.N.N%20format%20(e.g.%20%221.0.0%22%2C%20%221.2.10%22)&value=. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://server:8080' is therefore not allowed access.
Here is my job configuration:
Name: NewVersion
Regular expression: \d+\.\d+\.\d+
Failed Validation Message: The new version must in the N.N.N format (e.g. \"1.0.0\", \"1.2.10\")
Name: ReleaseVersion
Regular expression: \d+\.\d+\.\d+-SNAPSHOT
Failed Validation Message: The release version must in the N.N.N-SNAPSHOT format (e.g. \"1.0.1-SNAPSHOT\")
I think what is happening is that the plugin always uses the URL specified in the Jenkins configuration (under "Jenkins Location / Jenkins URL") instead of the actual URL that was used to load the page.
In my case, this is because our Jenkins instance can be accessed both with or without the full domain name, e.g. http://myserver/ and http://myserver.mydomain/. Other plugins seem to work fine regardless of which URL is used, but validating-string-parameter-plugin only works if the site was accessed using the exact same URL given in the configuration.
I have no control over which URL our users choose to access the site, and Jenkins provides no way that I can see to redirect to the canonical URL, so this plugin is unusable for me until this is fixed.
Stuart Sharpe
added a comment - I have also run in to this issue.
I think what is happening is that the plugin always uses the URL specified in the Jenkins configuration (under "Jenkins Location / Jenkins URL") instead of the actual URL that was used to load the page.
In my case, this is because our Jenkins instance can be accessed both with or without the full domain name, e.g. http://myserver/ and http://myserver.mydomain/ . Other plugins seem to work fine regardless of which URL is used, but validating-string-parameter-plugin only works if the site was accessed using the exact same URL given in the configuration.
I have no control over which URL our users choose to access the site, and Jenkins provides no way that I can see to redirect to the canonical URL, so this plugin is unusable for me until this is fixed.
[{"id":-1,"name":"My open issues","jql":"assignee = currentUser() AND resolution = Unresolved order by updated DESC","isSystem":true,"sharePermissions":[],"requiresLogin":true},{"id":-2,"name":"Reported by me","jql":"reporter = currentUser() order by created DESC","isSystem":true,"sharePermissions":[],"requiresLogin":true},{"id":-4,"name":"All issues","jql":"order by created DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-5,"name":"Open issues","jql":"resolution = Unresolved order by priority DESC,updated DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-9,"name":"Done issues","jql":"statusCategory = Done order by updated DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-3,"name":"Viewed recently","jql":"issuekey in issueHistory() order by lastViewed DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-6,"name":"Created recently","jql":"created >= -1w order by created DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-7,"name":"Resolved recently","jql":"resolutiondate >= -1w order by updated DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-8,"name":"Updated recently","jql":"updated >= -1w order by updated DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false}]
I have also run in to this issue.
I think what is happening is that the plugin always uses the URL specified in the Jenkins configuration (under "Jenkins Location / Jenkins URL") instead of the actual URL that was used to load the page.
In my case, this is because our Jenkins instance can be accessed both with or without the full domain name, e.g. http://myserver/ and http://myserver.mydomain/. Other plugins seem to work fine regardless of which URL is used, but validating-string-parameter-plugin only works if the site was accessed using the exact same URL given in the configuration.
I have no control over which URL our users choose to access the site, and Jenkins provides no way that I can see to redirect to the canonical URL, so this plugin is unusable for me until this is fixed.