Skip to content

Commit 69217cd

Browse files
committed
Fixed emailField function not accepting Maybe Text fields. Fixes #1442
1 parent 2d2623f commit 69217cd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

IHP/View/Form.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,12 +503,13 @@ colorField field = (textField field) { fieldType = ColorInput }
503503
-- </div>
504504
--
505505
-- See 'textField' for examples of possible form control options.
506-
emailField :: forall fieldName model.
506+
emailField :: forall fieldName model value.
507507
( ?formContext :: FormContext model
508-
, HasField fieldName model Text
508+
, HasField fieldName model value
509509
, HasField "meta" model MetaBag
510510
, KnownSymbol fieldName
511511
, KnownSymbol (GetModelName model)
512+
, InputValue value
512513
) => Proxy fieldName -> FormField
513514
emailField field = (textField field) { fieldType = EmailInput }
514515
{-# INLINE emailField #-}

0 commit comments

Comments
 (0)