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

Reject float tokens #14

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

Conversation

martijngastkemper
Copy link

Prevent tokens with e.g. a dot in it to be interpreted as a float, pass validation and cause an "Token must be a string of integer" exception.

Entering the token 123.123 causes the error.

Screenshot 2025-01-28 at 08 31 41

@michaeldzjap
Copy link
Owner

A token that starts with one or more 0's wouldn't pass this rule though. That could be problematic.

@martijngastkemper
Copy link
Author

A regex that matches only digits should the job.

Prevent tokens with e.g. a dot in it to be interpreted as a float, pass validation and cause an "Token must be a string of integer" exception.
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.

None yet

2 participants