Skip to content

Commit

Permalink
fix: Change .positive() to more correct .nonnegative()
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Dec 5, 2024
1 parent 4f2344c commit bd6ad07
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export const toFeeBreakdown = (data: PassportFeeFields): FeeBreakdown => ({
});

export const createPassportSchema = () => {
const questionSchema = z.number().positive();
const setValueSchema = z.tuple([z.coerce.number().positive()]);
const questionSchema = z.number().nonnegative();
const setValueSchema = z.tuple([z.coerce.number().nonnegative()]);
const feeSchema = z
.union([questionSchema, setValueSchema])
.transform(toNumber);
Expand Down

0 comments on commit bd6ad07

Please sign in to comment.