Skip to content

Commit

Permalink
fix: export first name schema
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Oct 10, 2024
1 parent 59a8ee6 commit 9d8c1b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/form/FirstNameField.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { PersonOutlined as PersonOutlinedIcon } from "@mui/icons-material"
import { InputAdornment } from "@mui/material"
import type { FC } from "react"
import { string as YupString } from "yup"

import TextField, { type TextFieldProps } from "./TextField"
import { firstNameSchema } from "../../schemas/user"

export type FirstNameFieldProps = Omit<
TextFieldProps,
Expand All @@ -20,7 +20,7 @@ const FirstNameField: FC<FirstNameFieldProps> = ({
}) => {
return (
<TextField
schema={YupString().max(150)}
schema={firstNameSchema}
name={name}
label={label}
placeholder={placeholder}
Expand Down
3 changes: 3 additions & 0 deletions src/schemas/user.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import * as yup from "yup"

export const firstNameSchema = yup.string().max(150)

0 comments on commit 9d8c1b5

Please sign in to comment.