Hello there,
As you probably know, custom validation rules are by default stored in \app\Rules\
I am allowing a user to upload a file and the file must pass certain validations. However, I also allow the user to zip the file into an archive and upload the archived zip file. So I created a set of validation rules which extract the files from the zip archive, and then test them for certain conditions.
For example, I created a rule which says a zip file can't contain more than X number of files. I created another one which says the contents of the zip file must match a particular mime type.
I am unsure of what naming conventions to use for my rules.
First idea:
\app\Rules\ZipEncoding
\app\Rules\ZipMaxFiles
\app\Rules\ZipMimeTypes
\app\Rules\ZipMinFiles
\app\Rules\ZipValid
Second idea:
\app\Rules\Zip\Encoding
\app\Rules\Zip\MaxFiles
\app\Rules\Zip\MimeTypes
\app\Rules\Zip\MinFiles
\app\Rules\Zip\Valid
Third idea:
\app\Rules\Zip\ZipEncoding
\app\Rules\Zip\ZipMaxFiles
\app\Rules\Zip\ZipMimeTypes
\app\Rules\Zip\ZipMinFiles
\app\Rules\Zip\ZipValid
Which naming convention and organisation structure do you prefer?
Thanks,