This works a little like the input filter, removing pasted characters that are invalid in the case where the keyboard allows more than the allowed characters, or characters are pasted in
displayable string