Last active
July 29, 2021 07:36
-
-
Save ronka/2f0013b66624693d3ca9c7deab0db9a3 to your computer and use it in GitHub Desktop.
Israeli phone number validation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var regex = /^0(5[^7]|[2-4]|[8-9]|7[0-9])[0-9]{7}$/; | |
regex.test('123456789'); // false | |
regex.test('0778330035'); // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment