Open mblasiusnyc opened 9 years ago
preventInvalidInput
uses the keyPress event to prevent entering invalid input. After each keyPress it confirms the current key that was pressed is valid. It doesn't look at the whole value for the input box. That's why pasting in a value bypasses the prevention.
I really don't want to check the whole input value every time a key is pressed because performing regex matches can get quite expensive. If you really want to prevent the user from pasting invalid input, then I recommend creating another directive that does it and apply it to the input box.
Currently, you can still paste invalid characters into an input box when "preventInvalidInput: true".