Files
LivePoll/backend/src/validations/voteValidation.js

14 lines
345 B
JavaScript
Raw Normal View History

2024-11-12 19:47:58 +05:30
import { z } from "zod";
const voteSchema = z.object({
pollId: z.string({
required_error: "Poll Id is required.",
invalid_type_error: "Poll Id should be a string.",
}),
optionId: z.string({
required_error: "Option Id is required.",
invalid_type_error: "Option Id should be a string.",
}),
});
export default voteSchema;