Hi Andrew Zimba ,
Not sure if branch versioning is required to implement this type of attribute rule. Hussein Nasser ; can you confirm?
What you do need to know is that you should check using "count" and not comparing it to null. If you do not have attachments, it will return an array with no items, yet it will not be null.
Since you want to check for jpg attachments, see the example below that will only check this content type and in this example I also check for the images size between 1M and 5M bytes.
var options = {"types": ["image/jpeg"],
"minsize": 1000000,
"maxsize": 5000000}
var atts = Attachments($feature, options);
if (Count(atts)==0) {
return false;
} else {
return true;
}