Change error messages on attachments upload

Hello,

I know this is the sort of question I've already asked on the forum and I've been directed more than once to the documentation but I really can't seem to find this information anywhere, so I'm sorry in advance if I missed some hints somewhere.

I have a form in which you can put attachments. The targeted audience by this form will be mainly speaking french, so I naturally translated every error messages that could pop up if the user does something that isn't supported per say.

The only exception is the attachments errors, like "File(s) uploaded successfully." or "File size too large.". I can't find a way to modify these anywhere in order to show a similar error in french, and I didn't find how to do it by code either.

I'm guessing that it's probably through the creation of a validator, but I wanted to check before tackling this.

Thanks a lot for the help !

Hello @almecin,

You can change attachments field messages text using this code:

fd.rendered(function () {
    fd.field('Attachments1').widget.localization.uploadSuccess = 'Uploaded';
    fd.field('Attachments1').widget.localization.invalidMaxFileSize= 'File is too big';
}); 
1 Like