Skip to content

Commit

Permalink
ui(earn): validate minsize on mount of form
Browse files Browse the repository at this point in the history
  • Loading branch information
theborakompanioni committed Sep 12, 2024
1 parent 91681fe commit 419f2fd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/Earn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,15 @@ const EarnForm = ({
}

return (
<Formik initialValues={initialValues} validate={validate} onSubmit={onSubmit}>
<Formik
initialValues={initialValues}
validate={validate}
onSubmit={onSubmit}
validateOnMount={true}
initialTouched={{
minsize: true,
}}
>
{(props) => {
const { handleSubmit, setFieldValue, handleBlur, values, touched, errors, isSubmitting } = props
const minsizeField = props.getFieldProps<AmountValue>('minsize')
Expand Down

0 comments on commit 419f2fd

Please sign in to comment.