Skip to content

Commit

Permalink
feat(validation): add validate function parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
remiroyc committed Jul 15, 2019
1 parent 1909301 commit e4e8712
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ function FormikWizardStep({
enableReinitialize
initialValues={step.initialValues}
validationSchema={step.validationSchema}
validate={step.validate}
onSubmit={handleSubmit}
render={(props) => (
<Form onSubmit={props.handleSubmit}>
Expand Down
3 changes: 2 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FormikProps } from 'formik'
import { FormikProps, FormikErrors } from 'formik'
import { WizardContext, WizardProps } from 'react-albus'
import { Schema } from 'yup'

Expand All @@ -15,6 +15,7 @@ export interface FormikWizardStepType {
id: string
component: React.SFC<{}>
validationSchema?: Schema<any>
validate?: (values: any) => void | object | Promise<FormikErrors<any>>,
initialValues?: FormikWizardBaseValues
actionLabel?: string
onAction?: (
Expand Down

0 comments on commit e4e8712

Please sign in to comment.