Skip to content

Commit 6e427a1

Browse files
yaitskovDaniil Iaitskov
andauthored
De-duplicate FormConfig fields (#92)
Co-authored-by: Daniil Iaitskov <daniil.iaitskov@soostone.com>
1 parent 2d195d2 commit 6e427a1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Formless.purs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module Formless
1111
, validateM
1212
, FormContext
1313
, FormConfig
14+
, OptionalFormConfig
1415
, FormQuery(..)
1516
, FormState
1617
, FormAction
@@ -144,12 +145,7 @@ type FieldOutput :: Type -> Type -> Type -> Type
144145
type FieldOutput input error output = output
145146

146147
-- | Available settings for controlling the form's behavior.
147-
type FormConfig =
148-
{ validateOnBlur :: Boolean
149-
, validateOnChange :: Boolean
150-
, validateOnModify :: Boolean
151-
, validateOnMount :: Boolean
152-
}
148+
type FormConfig = { | OptionalFormConfig }
153149

154150
type InitialFormConfig :: Row Type -> Type -> Type
155151
type InitialFormConfig fields action =

0 commit comments

Comments
 (0)