Skip to content

Commit

Permalink
fix: fix step regression bug
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed May 5, 2023
1 parent 7676459 commit bc59c70
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "schemastery",
"description": "Type driven schema validator",
"version": "3.7.4",
"version": "3.7.5",
"main": "lib/index.cjs",
"module": "lib/index.mjs",
"typings": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ Schema.extend('string', (data, { meta }) => {
function isMultipleOf(data: number, min: number, step: number) {
step = Math.abs(step)
if (!/^\d+\.\d+$/.test(step.toString())) {
return data % step === 0
return (data - min) % step === 0
}
const index = step.toString().indexOf('.')
const digits = step.toString().slice(index + 1).length
Expand Down
2 changes: 1 addition & 1 deletion packages/form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"vue": "^3"
},
"dependencies": {
"schemastery": "^3.7.4"
"schemastery": "^3.7.5"
}
}

0 comments on commit bc59c70

Please sign in to comment.