10 lines
256 B
TypeScript
10 lines
256 B
TypeScript
|
import { object, string, number, InferType } from "yup";
|
||
|
|
||
|
export const reviewSchema = object({
|
||
|
username: string().required(),
|
||
|
rating: number().positive().max(5).required(),
|
||
|
content: string(),
|
||
|
});
|
||
|
|
||
|
export type Review = InferType<typeof reviewSchema>;
|