/
PCF - Regular Expression Custom Field

PCF - Regular Expression Custom Field

The PCF - Regular Expression Custom Field lets you validate a text custom field against a regular expression. It is useful in verifying information types, such as Social Security Numbers, phone numbers, zip codes, currency, date formats, and others.

Prerequisites:

  • Basic understanding of regular expression syntax and patterns is necessary.

  • You have Jira Administrator role and permissions.

  • You have already created a Power custom field of the PCF - Regular Custom Field type.

Configure the PCF - Regular Expression Custom Field

  1. Locate your PCF - Regular Expression Custom Field on the Custom fields page and click Configure contexts. The configuration section will look like the one illustrated below:

    Configuration links for PCF - Regular Expression Custom Fields

     

  2. Click Edit Regex. This opens the configuration page for the custom field.

  3. Type the Regular Expression and Error Message for your custom field.

    Configuration fields for PCF - Regular Expression custom field
  4.  Click the Save. This associates the regular expression with the current custom field.

    Edit configuration links for a configured PCF - Regular Expression Custom Field.

Test the PCF - Regular Expression Custom Field

  1. After configuring the field, go to an issue and open it for editing.

  2. Edit the PCF - Regular Expression Custom Field with a value that does not match the regex.

  3. If you try to save the changes, this triggers an error message as shown in the example below.

    Error message for PCF - Regular Expression Custom Field on the edit issue screen.

To find more regex examples for your issue, search RegExLib.

 

Related content