From 25307f07c2b9fef603742813c074812352ea7db5 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Tue, 16 Jul 2024 09:49:21 +0000 Subject: [PATCH] simplify schema --- src/components/form/RepeatField.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/components/form/RepeatField.tsx b/src/components/form/RepeatField.tsx index 47d6910f..5125b56c 100644 --- a/src/components/form/RepeatField.tsx +++ b/src/components/form/RepeatField.tsx @@ -84,13 +84,7 @@ const RepeatField: FC = ({ name: repeatName, type, validate: schemaToFieldValidator( - YupString() - .required() - .test( - `matches-${name}`, - `does not match`, - repeatValue => value === repeatValue, - ), + YupString().required().equals([value], "does not match"), validateOptions, ), }