fix: multipleOf validation for large integers#2562
Open
TomerAberbach wants to merge 1 commit intoajv-validator:masterfrom
Open
fix: multipleOf validation for large integers#2562TomerAberbach wants to merge 1 commit intoajv-validator:masterfrom
multipleOf validation for large integers#2562TomerAberbach wants to merge 1 commit intoajv-validator:masterfrom
Conversation
bavulapati
added a commit
to bavulapati/ajv-plus
that referenced
this pull request
Oct 15, 2025
from ajv-validator#2562 Signed-off-by: Balakrishna Avulapati <ba@bavulapati.com>
bavulapati
added a commit
to theflashlabs/ajv-plus
that referenced
this pull request
Oct 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What issue does this pull request resolve?
#2561
What changes did you make?
I modified the
multipleOfto be correct and added a test.Is there anything that requires more attention while reviewing?
As far as I can tell the issue has always been there (since this commit)
Using
res !== parseInt(res)to check whereresis a decimal number is not reliable because large numbers like1e21stringify to"1e21"andparseInt("1e21")is just1...