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

Add a check to validate if pincode #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SushilG96
Copy link

This PR is opened to fix issue #4

Add a check if the Pincode is valid or not.

[Source-wiki] A Postal Index Number (PIN), or sometimes PIN code
refers to a six-digit code in the Indian postal code system used
by India Post.

Signed-off-by: SushilG96 [email protected]

main.go Outdated
Comment on lines 58 to 59
if len(pinCode) == 0 && (len(state) == 0 || len(district) == 0) {
return errors.New("Missing state or district name option")
Copy link
Owner

Choose a reason for hiding this comment

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

Hey @SushilG96, this was to check if none of Pincode or state/district is set. For Pincode validation, we should probably add a separate check below this.

Copy link
Author

Choose a reason for hiding this comment

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

Okay, will update the PR.

Add a check if the Pincode is valid or not.

[Source-wiki] A Postal Index Number (PIN), or sometimes PIN code
refers to a six-digit code in the Indian postal code system used
by India Post.

Signed-off-by: SushilG96 <[email protected]>
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.

2 participants