Skip to content

fix: decimal validation for extreme values and normalize trailing zeros#209

Merged
Jagadeeshftw merged 2 commits into
Fluxora-Org:mainfrom
Keengfk:fix/decimal-validation-extreme-values-normalize
Apr 26, 2026
Merged

fix: decimal validation for extreme values and normalize trailing zeros#209
Jagadeeshftw merged 2 commits into
Fluxora-Org:mainfrom
Keengfk:fix/decimal-validation-extreme-values-normalize

Conversation

@Keengfk
Copy link
Copy Markdown
Contributor

@Keengfk Keengfk commented Apr 26, 2026

i Fix OUT_OF_RANGE check to use int64 max (9223372036854775807) and extract integer part before BigInt comparison (old code stripped the decimal point, giving wrong magnitude)

  • Add normalizeDecimalString helper to strip trailing fractional zeros
  • validateDecimalString returns normalized value
  • serializeToDecimalString normalizes string pass-through via result.value
  • decimalStringField in schemas.ts applies .transform(normalizeDecimalString)
  • Tests: new normalizeDecimalString suite, int64 boundary cases, trailing-zero normalization round-trips

closes #124

Keengfk added 2 commits April 26, 2026 09:37
- Fix OUT_OF_RANGE check to use int64 max (9223372036854775807) and
  extract integer part before BigInt comparison (old code stripped the
  decimal point, giving wrong magnitude)
- Add normalizeDecimalString helper to strip trailing fractional zeros
- validateDecimalString returns normalized value
- serializeToDecimalString normalizes string pass-through via result.value
- decimalStringField in schemas.ts applies .transform(normalizeDecimalString)
- Tests: new normalizeDecimalString suite, int64 boundary cases, trailing-zero
  normalization round-trips
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 26, 2026

@Keengfk Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Jagadeeshftw Jagadeeshftw merged commit 1b1dffb into Fluxora-Org:main Apr 26, 2026
1 check failed
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.

Fix decimal validation for extreme values and normalize trailing zeros

2 participants