On this page
Use case
Validate that an issue has specific files attached.
In this use case, we want to validate that our issue has the following files attached:
- At least 1 .jar file
- At most 5 .txt file
- Exactly 1 XML file
- At least 3 images (any format).
Configuration
Value*
Choose value from field and select a specific field. e.g., Description
Regular expression*
Add the following expression:
matches(%{00072}, "(.*application/java-archive.*){1,}") AND matches(%{00072}, "(.*text/plain.*){0,5}") AND matches(%{00072}, "(.*text/xml.*){1}") AND matches(%{00072}, "(.*image/.*){3,}")
To implement this configuration, use copy a parsed text to a field (to add) post function in order to see the value that field "Attachments with details" takes when different file types are attached. Then it would be easy to write a regula expression for matching desired values.
Screenshots
Related use cases
If you still have questions, feel free to refer to our support team.