Jenkins : Validating String Parameter Plugin

Plugin Information

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

Older versions of this plugin may not be safe to use. Please review the following warnings before using an older version:

The validating string parameter plugin contributes a new parameter type to Jenkins 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 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

 

Attachments:

configure.PNG (image/png)
build-error.PNG (image/png)
build-success.PNG (image/png)
validerror.PNG (image/png)
validerror2.PNG (image/png)