Skip to content

Conversation

@r0xsh
Copy link
Member

@r0xsh r0xsh commented Oct 21, 2025

  • Fix tests
  • Add fuzzy plus codes detection (in case short plus code and suffix is added)
  • Make "Instruction" field mendatory when Plus Codes are used
  • See if Update/delete address in user profile #64 can be done shortly after this feature

@r0xsh r0xsh marked this pull request as ready for review November 5, 2025 08:14
@r0xsh
Copy link
Member Author

r0xsh commented Nov 24, 2025

Check whats wrong with tests

}

// Check if the input is a plus code - takes priority over all adapters
const plusCodeMatch = value.match(/\b[23456789CFGHJMPQRVWX]{2,8}\+[23456789CFGHJMPQRVWX]{2,4}\b/i)
Copy link
Member

Choose a reason for hiding this comment

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

I found other regexps in the documentation.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh yep, it seems a bit more precise, ty

Copy link
Member Author

Choose a reason for hiding this comment

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

Also i used mine since it allow some flexbility. You can write "FFDDD+2223, Ghana" and it will still match. The regex in the doc is a bit more strict and only allow the plus code part.
This is useful since copying it from gmaps for exemple, will add those suffix
image

}

// Check if the input is a plus code - takes priority over all adapters
const plusCodeMatch = value.match(/\b[23456789CFGHJMPQRVWX]{2,8}\+[23456789CFGHJMPQRVWX]{2,4}\b/i)
Copy link
Member

Choose a reason for hiding this comment

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

Why not use OpenLocationCode.isValid here?

Copy link
Member Author

Choose a reason for hiding this comment

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

The isValid don't allow to check for a specific resolution. You can use a very low resolution for example 1km² and will still be valid.. since this resolution is in the plus codes spec

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