Prevent special characters in multi upload field

25 views
Skip to first unread message

Daniel R.

unread,
Jul 17, 2025, 10:54:49 PMJul 17
to Orbeon Forms

Hello

For single upload fields I can check the file name for special characters, this works with the following validation formula:

not(matches(@filename, '[~"#%&*:<>?/\\{|}^$@!]'))

Now I want the same for multiupload fields. Does anyone have an idea?

Best regards,
Daniel

Alessandro Vernet

unread,
Jul 17, 2025, 11:03:52 PMJul 17
to orb...@googlegroups.com
Hi Daniel,

Try the following:

    empty(_[matches(@filename, '[~"#%&*:<>?/\\{|}^$@!]')])

This may seem increasingly cryptic, but it's actually quite simple ;). When using a Multiple File Attachments control, each file is stored in a child element `<_>`. The expression above simply checks whether any file name contains any of the specified characters; and ensures that none do.

I hope this helps,

-Alex

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orbeon+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/orbeon/9c6d1077-c73f-4954-b170-31058417513en%40googlegroups.com.

Daniel R.

unread,
Jul 18, 2025, 8:44:56 PMJul 18
to Orbeon Forms
Hello Alex,

Thank you very much, that works well. Perfect.

Best regards and a nice day,
Daniel


Alessandro Vernet

unread,
Jul 19, 2025, 2:04:29 AMJul 19
to orb...@googlegroups.com
Excellent, Daniel. And thank you for the update.

-Alex

Reply all
Reply to author
Forward
0 new messages