TextField.restrict backslash

I’m using latest openfl and lime from git

textInput.restrict = "^!<>|?/:*\"";

is there some proper way to exclude backslash ?
I tried several ways like \\ or \u005C

Since it’s a string, a backslash needs to be escaped, but backslash is also a special character for escaping other things, so I think you may need to escape it twice. Does \\\\ work?

1 Like

@joshtynjala thanks a lot

this one works

textInput.restrict = "^!<>|?/:*\"\\\\";
1 Like