Jump to content

Small Feature Request - postal code input parsing


LordEd

Recommended Posts

This is just something very simple. I found on the pocket query form, if i entered a postal code in the format v1x7l8 (no space in middle), it says "not in the database", but is valid if i enter the space.

 

I think a few lines of code would add a tiny bit of extra usability:

 

// auto postal correction guess

if (txtPostalCode.length == 6) {

txtPostalCode.text = txtPostalCode.text.insert(3, " ");

}

 

?

 

Obviously not a high priority, but if you happen to be in that block of code one day...

Link to comment

This is just something very simple. I found on the pocket query form, if i entered a postal code in the format v1x7l8 (no space in middle), it says "not in the database", but is valid if i enter the space.

 

I think a few lines of code would add a tiny bit of extra usability:

 

// auto postal correction guess

if (txtPostalCode.length == 6) {

txtPostalCode.text = txtPostalCode.text.insert(3, " ");

}

 

?

 

Obviously not a high priority, but if you happen to be in that block of code one day...

 

I can imagine that code could break the postal code of some other country, but since Canadian postal codes are always in the format of "letter/number/letter number/letter/number" (odd characters are letters, even characters are numbers) that pattern could be checked for before inserting the space.

Link to comment

I have not tried this on the pocket query page, but if you enter such a postal code on the home geocaching page, it works without the space (I am also in Canada). I suspect they just need to implement whatever code they use on their home page to the pocket query page.

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...