Currently, I am implementing an ng-pattern for an input field that should only allow Hebrew characters.
I have researched the Unicode numbers for Hebrew characters.
This is the pattern I am using:
$scope.hebrewCharacterPattern = /[\u05D0-\u05F3]+/g;
Here is my form input element:
<input tabindex=1 type="text" ng-disabled="disableButtons" name="firstname" ng-minlength="2" ng-maxlength="15" ng-model="register.firstName" placeholder="first name" ng-pattern="hebrewCharacterPattern" required title="please enter your name">
For most inputs, this pattern works correctly and prevents incorrect results like: "abcd" from populating $scope.firstname.
However, there are cases where inputs such as "שדas" are being accepted by the pattern for some unknown reason.
I suspect that the issue lies within the pattern definition. Despite being confident that u05D0-u05F3 covers the necessary range in my pattern, something seems to be amiss. Can you identify what the problem might be?