Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling english input doesn't really work #10

Open
veltzer opened this issue Aug 22, 2019 · 0 comments
Open

Disabling english input doesn't really work #10

veltzer opened this issue Aug 22, 2019 · 0 comments

Comments

@veltzer
Copy link
Owner

veltzer commented Aug 22, 2019

We disable english input using the \w+ regular expression. Turns out this is not good enough since, for instance, it allows russian input. What we really want is to only allow hebrew input + ctrl characters.

Implement this (from stack overflow)

You can check the Unicode block for this language here, I guess it is Hebrew, so the code range is 0590-05FF.

Then you can use ngPattern to do the validation like this:

function ctrl($scope) { $scope.pattern = /[\u0590-\u05FF]+/g; }

While doing this, better have the אנא השתמשו במקלדת עברית message time out after 5 seconds or something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant