Validation of files/attachments
There is no mechanism on this way natively.
What you can do is:
1/ when you instantiate the case, you can have an operation to check your constraints
2/ you can too build a fake variable. In the initialization of this variable, check files (file names are in the contract). If the result does not match your requirement, then throw an exception.