Child pages
  • Validating String Parameter Plugin

Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

Plugin Information

View Validating String Parameter on the plugin site for more information.

The validating string parameter plugin contributes a new parameter type to Jenkins that supports regular expression validation of the user's entered parameter.


This plugin is used wherever build parameter selection is available, most commonly in the job configuration page by enabling parameterized builds (this parameter type will also be available as release parameters using the release plugin).

Configure the parameter by entering a name, regular expression to validate the entered value and optionally a default value, an error message shown when the user entered value fails the regular expression check and a parameter description.

When a build is requested, the user will be prompted with the parameters to enter.  Users enter the parameter as normal, but will now be prompted with an error message if the entered value does not meet the regular expression.

Once the entered value meets the configured regular expression, the error message is no longer displayed.

Version History

Version 2.4 (TBD)

Version 2.3 (04-Feb-2015)

  • Fixed links to regex pattern documentation
  • Use codemirror for the description field

Version 2.2 (13-Sep-2011)

Version 2.1 (27-Feb-2011)

  • If an invalid value is passed to the build, the build will be aborted and an error message will display in console indicating the parameter and failing value

Version 2.0 (19-Feb-2011)

  • Migrated code to jenkins and performed release

Version 1.4 (13-Oct-2010)

  • JENKINS-7794 validation check doesn't work if Jenkins is hosted with a context root

Version 1.3 (22-May-2010)

  • JENKINS-6158 Build will fail if invalid parameter is passed
  • JENKINS-6160 Jenkins will record regex used to validate the build parameter as part of build configuration and display as tooltip on the parameter page.

Version 1.2 (29-Aug-2009)

  • Used the javascript function encodeURIComponent to properly handle characters within the user entered values for regex and validation error message. (Issue 4334

Version 1.1 (28-Aug-2009)

  • Supported the release plugins as well as any other plugin that uses build parameters

Version 1.0 (24-Aug-2009)

  • Initial Version



  1. Unknown User (

    I get the following error message when I try to execute a job with a Validating String Parameter.
    HTTP Status 404 - /descriptor/hudson.plugins.validating_string_parameter.ValidatingStringParameterDefinition/validate

    type Status report

    message /descriptor/hudson.plugins.validating_string_parameter.ValidatingStringParameterDefinition/validate

    description The requested resource (/descriptor/hudson.plugins.validating_string_parameter.ValidatingStringParameterDefinition/validate) is not available.

    Apache Tomcat/6.0.20

    I am using Hudson Version 1.334.
    I have the following plugins installed at the moment:
    email-ext, Plugin:maven-plugin, Plugin:regexemail, Plugin:scis-ad, Plugin:ssh-slaves, Plugin:subversion, Plugin:validating-string-parameter

    1. Unknown User (

      Is there any chance of this issue getting fixed? I have the same problem and am running Hudson 1.353.

      HTTP Status 404 - /descriptor/hudson.plugins.validating_string_parameter.ValidatingStringParameterDefinition/validate

      type Status report


      descriptionThe requested resource (/descriptor/hudson.plugins.validating_string_parameter.ValidatingStringParameterDefinition/validate) is not available.

      Apache Tomcat/5.5.9

      1. Unknown User (petehayes)

        I'm not sure what isn't working for you.  I was able to run with 1.353.  I have released 1.3 so you can try again with that version.

  2. Unknown User (mrbobbi)

    Hello everyone
    In our company we have set up two server running hudson covering two development branches.
    I discovered this plugin yesterday and must say, it would solves a big problem we have with our configuration.
    The problem is that the actual behaviour is not what one would expect. From my point of view its totally useless to validate a parameter
    and show an error messeage when afterwards I will still be able to hit the build button.
    Is it possible to disable the build button until the parameter has been successfully validated and the error message has gone?
    Actually using Hudson v1.336 with validating-string-parameter plugin v1.2
    Best regards

    1. Unknown User (petehayes)

      I have improved the plugin to fail the build if the parameter doesn't pass.  It isn't nice looking but the error message is there.  I think I'd need to change Hudson core to do something prettier.

      1. Unknown User (petehayes)

        At some point, the parameter extension point was granted new abilities and it is now possible for me to abort the build and display an error to the user in the console.  This is much nicer.

  3. Unknown User (asalicetti)

    On Hudson 1.339 and 1.342 this plugin does not work.

    I've tried with my regexp and also with the one in example here, but when I try to insert a value that clearly did not match, no message is shown.

    I'm trying with FF and all the Javascripts are enabled...



    1. Unknown User (petehayes)

      You have to change focus off the text field.  Maybe that's why the message wasn't showing?

  4. Unknown User (xiaopan3322)

    It seems only 1.2 version can be used, any other newer versions, will cause errors, when the error will be fixed?

    We need this useful plugin indeed...

  5. Unknown User (aartemov)

    Guys who created this plugin or who manages Jenkins plugin section, either fix this plugin or remove it as not working!

  6. Unknown User (adonheiser)

    I have found that calling my jenkins server without full dns causes this plugin to fail on the build page and display the string "ERROR"

    for example;




    worked around this by putting it behind apache and redirecting the URL to use the full domain

    error in logs is this;

    Error while serving
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(
    at org.kohsuke.stapler.Function.bindAndInvoke(
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(
    at org.kohsuke.stapler.MetaClass$1.doDispatch(
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(
    at org.kohsuke.stapler.Stapler.tryInvoke(
    at org.kohsuke.stapler.Stapler.invoke(
    at org.kohsuke.stapler.MetaClass$12.dispatch(
    at org.kohsuke.stapler.Stapler.tryInvoke(
    at org.kohsuke.stapler.Stapler.invoke(
    at org.kohsuke.stapler.MetaClass$4.doDispatch(
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(
    at org.kohsuke.stapler.Stapler.tryInvoke(
    at org.kohsuke.stapler.Stapler.invoke(
    at org.kohsuke.stapler.Stapler.invoke(
    at org.kohsuke.stapler.Stapler.service(
    at javax.servlet.http.HttpServlet.service(
    at winstone.ServletConfiguration.execute(
    at winstone.RequestDispatcher.forward(
    at winstone.RequestDispatcher.doFilter(
    at hudson.util.PluginServletFilter$1.doFilter(
    at hudson.util.PluginServletFilter.doFilter(
    at winstone.FilterConfiguration.execute(
    at winstone.RequestDispatcher.doFilter(
    at winstone.FilterConfiguration.execute(
    at winstone.RequestDispatcher.doFilter(
    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(
    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(
    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(
    at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(
    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(
    at winstone.FilterConfiguration.execute(
    at winstone.RequestDispatcher.doFilter(
    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(
    at winstone.FilterConfiguration.execute(
    at winstone.RequestDispatcher.doFilter(
    at hudson.util.CharacterEncodingFilter.doFilter(
    at winstone.FilterConfiguration.execute(
    at winstone.RequestDispatcher.doFilter(
    at winstone.RequestDispatcher.forward(
    at winstone.RequestHandlerThread.processRequest(
    at java.util.concurrent.Executors$
    at java.util.concurrent.FutureTask$Sync.innerRun(
    at winstone.BoundedExecutorService$
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$
    Caused by: java.lang.NullPointerException
    at java.util.regex.Pattern.(
    at java.util.regex.Pattern.compile(
    at java.util.regex.Pattern.matches(
    at hudson.plugins.validating_string_parameter.ValidatingStringParameterDefinition$DescriptorImpl.doValidate(
    ... 69 more

    1. Unknown User (klamb)

      I have discovered the same problem. As your post is almost 4 years old, I am guessing it is not going to ever get fixed. :/

  7. Unknown User (mcollin2)

    I had originally downloaded this plugin, some months ago, and things seemed to be working fine.

    And just recently I've noticed, last 2 weeks to a month ago, the validations don't seem to be happening.

    I've even upgraded to version 2.3, and it still doesn't seem to work correctly :(

    When I type values in the fields everything seems to be accepted/not validated.

    Works with any browser I user, IE and FF

    Whether I'm logged in or not.

    Seems to be happening with coworkers as well.

    Any suggestions ?

    Known conflicts with any other plugins ?

  8. Unknown User (jhyland87)

    This doesnt seem to be working anymore.. I used this at my last job just fine, and trying to use it again, but it doesnt work.

    I created a Validating String Param, and set the Regex pattern to* .+-SNAPSHOT* (exactly whats in the above examples), but when I click build, it executes the build, even if the value is empty

    1. Unknown User (mig82)

      If you look at the implementation of class ValidatingStringParameterValue you'll see that it overrides the implementation of public BuildWrapper createBuildWrapper(AbstractBuild<?, ?> build) in a way that aborts if the string is invalid. This will only work on Freestyle jobs and other job types extending AbstractBuild. I'm afraid this does not apply to pipeline jobs. Maybe in your prior project you used freestyle jobs.

  9. Unknown User (aditya_dube)

    Hi Team,


    Can we look at an enchasement to disable the build button if the validation fails. Enable only when all the validations have passed.