Skip to content

Accept the full uint64 range in unsigned string validation - #346

Open
vitalivo wants to merge 1 commit into
gookit:masterfrom
vitalivo:fix/uint-string-range
Open

vitalivo wants to merge 1 commit into
gookit:masterfrom
vitalivo:fix/uint-string-range

Conversation

@vitalivo

Copy link
Copy Markdown

IsUint("4294967296") returns false even though the equivalent uint64 value passes. The string branch parses with a 32-bit limit, rejecting valid unsigned values between 2^32 and 2^64−1. The registered uint rule has the same limit.

Use a 64-bit unsigned parse in both paths. Added tests through the public helper and map validation for the 32-bit boundary and MaxUint64, plus invalid/overflow controls.

Validation: the two values above MaxUint32 fail before the change in both paths. Full race/coverage tests, build, vet, and golangci-lint (no new issues) pass.

@vitalivo vitalivo closed this Sep 12, 2026
@vitalivo vitalivo reopened this Sep 12, 2026
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.

1 participant