Allow textareaFields to have a required attribute
(Just like `htmlField` does)
This commit is contained in:
parent
4d4f0c137c
commit
dd6a184052
@ -193,9 +193,9 @@ instance ToHtml Textarea where
|
||||
textareaField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Textarea
|
||||
textareaField = Field
|
||||
{ fieldParse = parseHelper $ Right . Textarea
|
||||
, fieldView = \theId name attrs val _isReq -> toWidget [hamlet|
|
||||
, fieldView = \theId name attrs val isReq -> toWidget [hamlet|
|
||||
$newline never
|
||||
<textarea id="#{theId}" name="#{name}" *{attrs}>#{either id unTextarea val}
|
||||
<textarea id="#{theId}" name="#{name}" :isReq:required="" *{attrs}>#{either id unTextarea val}
|
||||
|]
|
||||
, fieldEnctype = UrlEncoded
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user