files
Uploaded files attributes should be valid, based on value config (read more in Files validation section).
const validator = new JustValidate('#form');
validator.addField('#files', [
{
rule: 'files',
value: {
files: {
extensions: ['jpeg', 'jpg', 'png'],
maxSize: 20000,
minSize: 10000,
types: ['image/jpeg', 'image/jpg', 'image/png'],
},
},
},
]);