Im sure this is something simple that im missing, but my google-fu is failing me.
I would like to force a user to attach a file when the checkbox custom field "BIP Setup Type" checkbox has "NWEA (Requires Comprehensive Data File (CDF) Upload)" checked. I wrote a behavior but it was a bit clunky so I changed it to a validator off of the Create transition. When I set the following validator, the ticket throws the error regardless if "NWEA (Requires Comprehensive Data File (CDF) Upload)" is checked or not.
import com.atlassian.jira.component.ComponentAccessor
cfValues['BIP Setup Type']*.value.contains("NWEA (Requires Comprehensive Data File (CDF) Upload)") || ComponentAccessor.attachmentManager.getAttachments(issue).size() >= 1