Remove 'strict()' not sure what it does
This commit is contained in:
parent
531b28501b
commit
3846034a44
|
@ -1,7 +1,7 @@
|
||||||
import { object, string, number, InferType } from "yup";
|
import { object, string, number, InferType } from "yup";
|
||||||
|
|
||||||
export const reviewSchema = object({
|
export const reviewSchema = object({
|
||||||
username: string().strict(true).max(30).required(),
|
username: string().max(30).required(),
|
||||||
rating: number()
|
rating: number()
|
||||||
.positive()
|
.positive()
|
||||||
.max(5)
|
.max(5)
|
||||||
|
@ -11,8 +11,8 @@ export const reviewSchema = object({
|
||||||
(number) => (number! * 10) % 5 === 0,
|
(number) => (number! * 10) % 5 === 0,
|
||||||
)
|
)
|
||||||
.required(),
|
.required(),
|
||||||
title: string().strict(true).max(50).required(),
|
title: string().max(50).required(),
|
||||||
content: string().strict(true).max(2000).notRequired(),
|
content: string().max(2000).notRequired(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export type Review = InferType<typeof reviewSchema>;
|
export type Review = InferType<typeof reviewSchema>;
|
||||||
|
|
Loading…
Reference in a new issue