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";
|
||||
|
||||
export const reviewSchema = object({
|
||||
username: string().strict(true).max(30).required(),
|
||||
username: string().max(30).required(),
|
||||
rating: number()
|
||||
.positive()
|
||||
.max(5)
|
||||
|
@ -11,8 +11,8 @@ export const reviewSchema = object({
|
|||
(number) => (number! * 10) % 5 === 0,
|
||||
)
|
||||
.required(),
|
||||
title: string().strict(true).max(50).required(),
|
||||
content: string().strict(true).max(2000).notRequired(),
|
||||
title: string().max(50).required(),
|
||||
content: string().max(2000).notRequired(),
|
||||
});
|
||||
|
||||
export type Review = InferType<typeof reviewSchema>;
|
||||
|
|
Loading…
Reference in a new issue