Skip to content

Conversation

@zemzale
Copy link
Member

@zemzale zemzale commented Dec 23, 2025

Fixes Or Enhances

Although the E164 spec technically would allow for numbers with only one
digit after the country code, we used to expect atleast 7 digits, since
that is what is way more practical.

In fix for E164 to disallow leading 0 in country codes, we lowered said
limit to 1 digit. This broke things for peoples as numbers like 123456
became valid.

Reverting back to the original limit of 7 digits, is practical, and
probably the expected behavior out of this validator.

Related #1515

Make sure that you've checked the boxes below before you submit PR:

  • Tests exist or have been written that cover this particular change.

@go-playground/validator-maintainers

@zemzale zemzale requested a review from a team as a code owner December 23, 2025 09:04
@zemzale zemzale force-pushed the revert-e164-min-limit branch from 87d350a to 10841cb Compare December 23, 2025 09:06
Although the E164 spec technically would allow for numbers with only one
digit after the country code, we used to expect atleast 7 digits, since
that is what is way more practical.

In fix for E164 to disallow leading 0 in country codes, we lowered said
limit to 1 digit. This broke things for peoples as numbers like `123456`
became valid.

Reverting back to the original limit of 7 digits, is practical, and
probably the expected behavior out of this validator.
@zemzale zemzale force-pushed the revert-e164-min-limit branch from 10841cb to 6975b54 Compare December 23, 2025 09:18
@coveralls
Copy link

coveralls commented Dec 23, 2025

Coverage Status

coverage: 73.814%. remained the same
when pulling 6975b54 on revert-e164-min-limit
into 65b1bcc on master.

@coveralls
Copy link

Coverage Status

coverage: 73.789%. remained the same
when pulling 87d350a on revert-e164-min-limit
into e9b900c on master.

@deankarn deankarn merged commit e8627a1 into master Dec 24, 2025
8 checks passed
@deankarn deankarn deleted the revert-e164-min-limit branch December 24, 2025 15:57
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.

5 participants