ng-pattern-restrict
ng-pattern-restrict copied to clipboard
Allowing only certain inputs based on a regex pattern, for AngularJS
## Beep boop. Your images are optimized! Your image file size has been reduced by **14%** 🎉 Details | File | Before | After | Percent reduction | |:--|:--|:--|:--| |...
Hi @AlphaGit, I'm currently using ng-pattern-restrict with a slight modification: Original Version: ```javascript function revertToPreviousValue() { iElement.val(oldValue); if (!angular.isUndefined(caretPosition)) { setCaretPosition(caretPosition); } } ``` Normally, whenever a user changes the...
I use the following pattern for ng-pattern-restrict (as an example) `"^[+\-]?([1-3])*$"` It is applied to a input type=number field. When using ng-pattern-restrict, I am not able to start typing numbers...
I know that there is part of the angular validation behaviour, but would be great to manage this: When you use use ng-pattern-restrict with, for example: "^\d*$" If you write...
Allow consumers of the directive to be notified when a particular value passed or did not pass the validation. If possible, allow them to see the entered value before it...
Provide the ability to create masks along with the input restriction. Something similar to https://github.com/RobinHerbots/jquery.inputmask