Skip to content

KE number validation rules - #2896

Closed
colest470 wants to merge 1 commit into
validatorjs:masterfrom
colest470:feature/KE-mobile-validator
Closed

colest470 wants to merge 1 commit into
validatorjs:masterfrom
colest470:feature/KE-mobile-validator

Conversation

@colest470

Copy link
Copy Markdown

This PR updates the en-KE (Kenya) regex in the phones object to properly validate Kenyan mobile numbers against the Communications Authority of Kenya (CA) Telecommunication Numbering Plan.

It only checks that the number begins with 7 or 1 after the country code, then blindly accepts any 8 digits. This means invalid prefixes such as 071, 074, 076, 079, 010, 0118, 019, etc.which are not assigned to any Kenyan mobile operator , incorrectly pass validation.
From:https://www.ca.go.ke/sites/default/files/CA/Numbering%20Plan/Telecommunication%20Numbering%20Plan%20for%20Kenya%20May%202025.pdf it now validates the "valid ranges" eg. isMobilePhone('0710000000', 'en-KE') //false

@colest470 colest470 closed this Oct 2, 2026
@colest470
colest470 deleted the feature/KE-mobile-validator branch October 2, 2026 13:55
@colest470
colest470 restored the feature/KE-mobile-validator branch October 2, 2026 13:55
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

Successfully merging this pull request may close these issues.

1 participant