Merge pull request #849 from MaxGabriel/requiredTextArea
Allow textareaFields to have a required attribute
This commit is contained in:
commit
8570b4568f
@ -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