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

postal code validation fix for locale IN #1152

Merged
merged 2 commits into from
Oct 13, 2019
Merged

postal code validation fix for locale IN #1152

merged 2 commits into from
Oct 13, 2019

Conversation

adityaraval
Copy link
Contributor

Issue fix for #1151

@preethamvishy
Copy link

This is a good catch!
I got curious and looked up valid Indian pin codes and I found this: https://www.thebetterindia.com/70401/decoding-the-indian-pincode/. Do we want validation for first 2 digits of the pin code? For example, 35XXXX and 86XXXX are invalid too, apparently.

@adityaraval
Copy link
Contributor Author

@preethamvishy according to this https://www.thebetterindia.com/70401/decoding-the-indian-pincode/

I have updated the regex. Now it will not validate the postal codes starts with (10,29,35,54,55,65,66,86,87,88,89)

Copy link
Member

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust you on this one. And thanks for your contribution 🎉

@profnandaa profnandaa merged commit d18a8b8 into validatorjs:master Oct 13, 2019
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.

3 participants