File Picker - Regular Expression
I am noticing that even though I am setting a regular expression in my file picker item in my Display Form, I can still submit a file name value that does not follow my rule.
My reg experession should allow file names that allow alpha-numeric char's as well as underscores and periods: ^[a-zA-Z0-9._]+$ - this tests out in the "test" text box when designating the reg expression.
However, I can add a file through the file picker that has an ampersand for example - which breaks what I am trying to accomplish. Any ideas?
Using Essentials 4.2.2 with SLV 2.3.3
-
In Silverlight the Regular Expression validator does not run on File Picker results. Only the Required and File Size validators apply.
--Ryan
0 -
No problem. I'll just strip out the bad characters after the file name is decided.
0 -
Can anyone offer some quick reg expression support to disallow all special characters except a period?
Say I have "Miss?@.png" as my fileName - how do I get it to "Miss.png" ? I have been trying to figure out how to allow alpha numeric characters and a period only.
0 -
I think this should do it:
"[)(?*"",\\<>&#~%{}+_@:\/!;$^]+"
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare