upload a file if I want to put a file. So the file widget can be empty or filled.
If the widget is filled, I want to check the file name to allow only some file extensions (.pdf, .png,…). I already did it with a regex code and it works. But this validator dont let the possibility to have the field empty and obliged the user to put a file on it…
Can you tell me why it doesn’t works like I want? I already try to add a “if” loop on it and test the filename or filecontent to see if it is empty or equals to “” but nothing works.
Thanks for your help.
I would ask this question “validating a variable with regex” in a different place like http://stackoverflow.com/.
The reason, it’s a REGEX expression issue and not directly related to the operation of Bonita. You may have to change the question to be less specific about Bonita like,
I have a variable that donates a file value. My regex is .{the regex code}. which works in that it only allows the file types I want, but I also want it to allow for null (empty) values. Can someone help?
You will get a much quicker answer there as well, usually within a couple of hours max, even during the weekend.
Good luck, hope this helps,
regards
PS I know nothing about regexs and use stack often
Bonitasoft empowers development teams with Bonita, the open-source and extensible platform to solve the most demanding process automation use cases. The Bonita platform accelerates delivery of complex applications with clear separation between capabilities for visual programming and for coding. Bonita integrates with existing solutions, orchestrates heterogeneous systems, and provides deep visibility into processes across the organization.