Fix rating logic
This commit is contained in:
parent
6298fe8cfc
commit
1fd79b50eb
|
@ -8,9 +8,7 @@ export const reviewSchema = object({
|
|||
.test(
|
||||
"maxDigitsAfterDecimal",
|
||||
"Rating can only have at most one integer at half intervals (.0 or .5)",
|
||||
(number) => {
|
||||
!((number! * 10) % 5);
|
||||
},
|
||||
(number) => (number! * 10) % 5 === 0,
|
||||
)
|
||||
.required(),
|
||||
title: string().strict(true).max(50).required(),
|
||||
|
|
Loading…
Reference in a new issue