Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Validate paragraph type field content

Asier Vadillo
Contributor
October 10, 2025

Hi everyone,

We are using JMWE to make a validation using Jira expressions in our workflow.

What we want to do is to validate that a custom field (Paragraph type) has value,  does not include images, account IDs (using @), links or bullet lists.

Currently we have:
 

!!issue.customfield_10171 && (
!JSON.stringify(issue.customfield_10171).includes("!image-") && 
!JSON.stringify(issue.customfield_10171).includes("~accountid") && 
!JSON.stringify(issue.customfield_10171).includes("https://") && 
!JSON.stringify(issue.customfield_10171).includes("http://") && 
!JSON.stringify(issue.customfield_10171).match("[\\*\\-\\+] ")
)

This works with links, but not for the account ids, images or bullet lists. 
Anyone knows how to modify the expression to achieve what we want?
Thanks in advance!

1 answer

0 votes
Akash Singh
Community Champion
October 10, 2025

Hi @Asier Vadillo 

If your Paragraph type field is using rich-text renderer then the field values are stored in Atlassian document format and you can use below Jira expression to disallow such values.

 

let cf = JSON.stringify(issue.customfield_10171);

cf && (
  cf.match('"type":"media"') ||
  cf.match('"type":"mention"') ||
  cf.match('"type":"inlineCard"') ||
cf.match('"type":"blockCard"') ||
cf.match('"type":"link"') ||
  cf.match('"type":"bulletList"') ||
  cf.match('"type":"orderedList"')
) == null

Note: I have used media to disallow all media types (images/videos/docs etc.) and inlineCard/blockCard/link for URLs.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events