diff --git a/storybook/src/docs/form/Validation.stories.tsx b/storybook/src/docs/form/Validation.stories.tsx index 91d427042e..bcaffabebf 100644 --- a/storybook/src/docs/form/Validation.stories.tsx +++ b/storybook/src/docs/form/Validation.stories.tsx @@ -98,9 +98,9 @@ export const Warnings = () => { email: string; } - const validateWarning = (values: FormValues) => { - if (values.name === "Max Mustermann") { - return { name: "Example name " }; + const validateWarningName = (name: string) => { + if (name === "Max Mustermann") { + return "Example name"; } }; @@ -116,10 +116,17 @@ export const Warnings = () => { onSubmit={() => { // noop }} - validateWarning={validateWarning} initialValues={{ name: "", email: "" }} > - +