i have a register form inside i want users to insert their first name and last name only in hebrew letters.
this is my ng-pattern:
$scope.onlyHebrewPattern = /[\u05D0-\u05F3]+/g;
this is my input type:
<input type="text" ng-disabled="disableButtons" name="firstname" ng-minlength="2" ng-maxlength="15" ng-model="register.firstName" placeholder="firstname" ng-pattern="onlyHebrewPattern" required title="please enter your name">
then in my controller i go and check:
if (!registerForm.firstname.$valid)
and if it true i will prompt an error message.
for most cases this will work but there are cases that it won't work for like this input:
לגחדךלכsddski it will not trigger an invalid in the form.
i just can't understand what's wrong. i suppose something with my pattern?
thanks.