I have TextBox which allow insert only numeric values (filtering), But when I paste copied text it’s allow any kind of symbol. How can I prevent or filter text before pasting?
I have TextBox which allow insert only numeric values (filtering), But when I paste
Share
You could backup your text before any manual input and then when the input provided isn’t valid restore the previous text like so:
I wouldn’t recommend trying to capture the control keys or anything because when you’re on a mac or on linux then you’re screwed.
Adjust my sample and pour it inside a new textbox control to make it cleaner but you get the idea.