Skip to content

Commit

Permalink
simplify schema
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Jul 16, 2024
1 parent 957dc4d commit 25307f0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/components/form/RepeatField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,7 @@ const RepeatField: FC<RepeatFieldProps> = ({
name: repeatName,
type,
validate: schemaToFieldValidator(
YupString()
.required()
.test(
`matches-${name}`,
`does not match`,
repeatValue => value === repeatValue,
),
YupString().required().equals([value], "does not match"),
validateOptions,
),
}
Expand Down

0 comments on commit 25307f0

Please sign in to comment.