I don't see it checking by default. So I should use <regexmatch> specifically to detect the invalid characters, right? Could you give an example?
asked 21 Nov '12, 19:31
This depends on what your invalid characters are. Is this caused by the application not handling certain letters (i.e. Unicode) in path correctly. If so, the recommended approach is to create a regular expression that throws away invalid values:
The above will catch any character that may be illegal, including Unicode characters. This may cause issues for some OSes where paths may include non-latin characters, though.
Another option is to create a regular expression that checks that the path matches a specific pattern or only uses acceptable characters. For example:
This only accepts basic ascii characters, slash and back slash.
answered 22 Nov '12, 04:32