Skip to content

Commit 5a29a1b

Browse files
committed
docs: fix standard schema validation type
1 parent b20f9c8 commit 5a29a1b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

examples/react/standard-schema/src/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function FieldInfo({ field }: { field: AnyFieldApi }) {
1010
return (
1111
<>
1212
{field.state.meta.isTouched && field.state.meta.errors.length ? (
13-
<em>{field.state.meta.errors.join(',')}</em>
13+
<em>{field.state.meta.errors.map((err) => err.message).join(',')}</em>
1414
) : null}
1515
{field.state.meta.isValidating ? 'Validating...' : null}
1616
</>
@@ -58,9 +58,6 @@ export default function App() {
5858
// Do something with form data
5959
console.log(value)
6060
},
61-
// DEMO: There's no need to pass an adapter! You may use it only if you need to pass custom options.
62-
// validatorAdapter: standardSchemaValidator(),
63-
// validatorAdapter: standardSchemaValidator({ transformErrors: (issues) => issues.map((issue) => issue.message)[0] }),
6461
})
6562

6663
return (

0 commit comments

Comments
 (0)