Remove either the label use-case-smart-text or use-case-smart-number depending on the feature the use case is based on

Use case

Return "Valid" if the custom field value matches the regular expression and "Invalid" if it does not.

Expression

Create and configure a Smart field using this expression in General parsing mode:

%{matches(%{issue.cfnnnnn},"6|7|8|9") ? "Valid":"Invalid"}

The values entered as arguments in the matches() parser function can be replaced with different values or with a regular expressions to validate differently the value of the custom field.

Please, note that it is necessary to replace nnnnn with the ID of the custom field.

Used parser functions

Feature

Field type

Smart text field

Parsing mode

General

Expression
%{matches(%{issue.cfnnnnn},"6|7|8|9") ? "Valid":"Invalid"}

The values entered as arguments in the matches() parser function can be replaced with different values or with a regular expressions to validate differently the value of the custom field.

Please, note that it is necessary to replace nnnnn with the ID of the custom field.

Label
Use case description

Return "Valid" if the custom field values matches the regular expression and "Invalid" if it does not.

Complexity