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

battle_tag_check fails to validate correctly formatted battle tag #1

Open
ColeMundus opened this issue May 6, 2024 · 0 comments
Open

Comments

@ColeMundus
Copy link

Describe the bug
The battle_tag_check method in the Overwatch class incorrectly restricts the battletag ID to only 4 or 5 digits. Overwatch player IDs can sometimes be 6 digits long, so this validation fails for valid battletags with 6-digit IDs.

To Reproduce
Steps to reproduce the behavior:

  • Call the all_player_data method with a battletag that has a 6-digit ID, e.g., ExampleUser#123456.
  • Observe that the method fails to validate this correctly formatted battletag.

Expected behavior
The method should correctly validate battletags with IDs that are 4, 5, or 6 digits long. Battletags such as ExampleUser#123456 should be recognized as valid.

The regular expression used in the battle_tag_check method is r"^[a-zA-Z0-9]{3,12}#[0-9]{4,5}$". This should be updated to r"^[a-zA-Z0-9]{3,12}#[0-9]{4,6}$" to accommodate battletags with 6-digit IDs.

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

No branches or pull requests

1 participant