Validate file uploads in block in Twill 3
Hi there - does anyone know what the correct syntax is to validate file uploads using
twillBlockValidationRulesForTranslatedFields
?
I've got a translated file input for a single pdf.
and at the top of the file:
But on validation this always thinks that the file is missing e.g.
I've tried various other keys for the rule e.g. medias.file
etc with similar results.
What am I doing wrong? Is this not currently supported?4 Replies
Medias payload in devtools looks correct as far as I can see:
Hi @moussaclarke there may be a way to make it work but not officially supported. @antonio.a17 recently worked on a PR to improve blocks/repeater validation, but I don't think translated files have been considered specifically.
thanks @ifox I will take a look. is this the pr in question? https://github.com/area17/twill/pull/2638
GitHub
Add support for nested block validation by antonioribeiro · Pull Re...
Description
Adds support not only to validate neste blocks, but also for custom messages, all to be set within the block.
Here's how it presents itself:
Here's a full block example...
Correct