Skip to content

Commit 84931a6

Browse files
committed
update
1 parent 2f065b3 commit 84931a6

File tree

1 file changed

+3
-2
lines changed
  • packages/orm/src/client/crud/validator

1 file changed

+3
-2
lines changed

packages/orm/src/client/crud/validator/utils.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import type {
1111
import Decimal from 'decimal.js';
1212
import { match, P } from 'ts-pattern';
1313
import { z } from 'zod';
14+
import { ZodIssueCode } from 'zod/v3';
1415
import { ExpressionUtils } from '../../../schema';
1516
import { QueryError } from '../../errors';
1617

@@ -174,7 +175,7 @@ export function addDecimalValidation(
174175
error?.issues.forEach((issue) => {
175176
if (op === 'gt' || op === 'gte') {
176177
ctx.addIssue({
177-
code: 'too_small',
178+
code: ZodIssueCode.too_small,
178179
origin: 'number',
179180
minimum: value,
180181
type: 'decimal',
@@ -183,7 +184,7 @@ export function addDecimalValidation(
183184
});
184185
} else {
185186
ctx.addIssue({
186-
code: 'too_big',
187+
code: ZodIssueCode.too_big,
187188
origin: 'number',
188189
maximum: value,
189190
type: 'decimal',

0 commit comments

Comments
 (0)