Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yesod-form fileAFormReq not using required attribute in HTML #1779

Open
tux314159 opened this issue Sep 12, 2022 · 1 comment
Open

yesod-form fileAFormReq not using required attribute in HTML #1779

tux314159 opened this issue Sep 12, 2022 · 1 comment

Comments

@tux314159
Copy link

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!

@schoettl
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants