Validating String Parameter Plugin

Plugin Information

Plugin ID validating-string-parameter
Latest Release 1.5
Latest Release Date Jan 30, 2011
Plugin Central Plugin Central 3.2
Sources Github
Support Eclipse Hudson Forum
Issue Tracking Eclipse Bugzilla
Hudson Core (latest) 3.3.3

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

Usage

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 1.5 (30-Jan-2011)

  • Reverted last change as that broke validation if running behind reverse proxy.  The original issue must be addressed by setting the Hudson url in the system settings.
  • Migrated plugin to github

Version 1.4 (13-Oct-2010)

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

Version 1.3 (22-May-2010)

  • HUDSON-6158 Build will fail if invalid parameter is passed
  • HUDSON-6160 Hudson 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

 

Labels:

plugin-misc plugin-misc Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Nov 18, 2009

    Arindam Roy says:

    I get the following error message when I try to execute a job with a Validating ...

    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:
    [Plugin:email-ext, Plugin:maven-plugin, Plugin:regexemail, Plugin:scis-ad, Plugin:ssh-slaves, Plugin:subversion, Plugin:validating-string-parameter]

    1. May 06, 2010

      Jeff Heckel says:

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

      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

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

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


      Apache Tomcat/5.5.9

      1. May 23, 2010

        Peter Hayes says:

        I'm not sure what isn't working for you.  I was able to run with 1.353.&nbs...

        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. Dec 11, 2009

    Pasquale Guida says:

    Hello everyone In our company we have set up two server running hudson covering ...

    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
    Pasquale

    1. May 23, 2010

      Peter Hayes says:

      I have improved the plugin to fail the build if the parameter doesn't pass. ...

      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.

  3. Jan 26, 2010

    Andrea Salicetti says:

    On Hudson 1.339 and 1.342 this plugin does not work. I've tried with my regexp ...

    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...

    Regards,

    Andrea

    1. May 23, 2010

      Peter Hayes says:

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

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

  4. Apr 20, 2011

    Bergaoui Rim says:

    Hi All, I want to enter an id to my build parameters and in the configuration i ...

    Hi All,
    I want to enter an id to my build parameters and in the configuration i want to specify if it is mandatory or not.

    If the id is mandatory and i launch the build, when i enter a value in the parameter the build starts else (if i don't enter a value in the id case) the build doesn't start.

    Regards,
    Rim.