The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
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.

Asier Vadillo
Contributor
October 12, 2025

Hi @Akash Singh , this solves the problem!

And also it gave me insights to better understand how the text content is used in Atlassian.

Thanks!

Like Akash Singh likes this
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events