Skip to content

Commit

Permalink
minor changes #8
Browse files Browse the repository at this point in the history
  • Loading branch information
ukorvl committed Sep 7, 2023
1 parent 09481ca commit 1c56a11
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
3 changes: 2 additions & 1 deletion components/pages/Contact/Form/validationSchema.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {z} from 'zod';
import {toFormikValidationSchema} from 'zod-formik-adapter';

const requiredFields = z.object({
name: z.string().min(1, 'Name is required').max(50, 'Too Long!'),
Expand All @@ -24,4 +25,4 @@ const validationSchema = requiredFields.and(optionalFields);
*/
export type ContactFormData = z.infer<typeof validationSchema>;

export default validationSchema;
export default toFormikValidationSchema(validationSchema);
18 changes: 17 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"tailwind-merge": "^1.13.1",
"tailwindcss": "^3.3.3",
"typescript": "5.0.4",
"zod": "^3.22.2"
"zod": "^3.22.2",
"zod-formik-adapter": "^1.2.0"
},
"devDependencies": {
"@next/bundle-analyzer": "^13.4.5",
Expand Down

0 comments on commit 1c56a11

Please sign in to comment.