yesodweb/yesod

yesod-form fileAFormReq not using required attribute in HTML

tux314159 opened this issue · 1 comments

Hi, I was using Yesod's applicative forms and I noticed that while areq produces an input element with required="", fileAFormReq does not, and so the form can be submitted without the file uploaded (which causes a server-side exception); I don't think this is the intended behaviour. I'm using yesod-core 1.6.24.0 and yesod-form 1.7.0 on GHC 9.0.2.

Thanks!

Right, the required attribute should probably be merged into the fs parameter here:
https://hackage.haskell.org/package/yesod-form-1.7.0/docs/src/Yesod.Form.Fields.html#fileAFormReq