Skip to content

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 susgupta@redhat.com

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 <susgupta@redhat.com>
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