addons-server
addons-server copied to clipboard
Use setCustomValidity for File Uploads
Fixes: mozilla/addons#15039
Description
- Modifies FileFields to use setCustomValidity to check the max file size.
- Use
MAX_UPLOAD_SIZEin place of hard-coded constant in version upload.
Checklist
- [x] Add
#ISSUENUMat the top of your PR to an existing open issue in the mozilla/addons repository. - [x] Successfully verified the change locally.
- [ ] The change is covered by automated tests, or otherwise indicated why doing so is unnecessary/impossible.
- [x] Add before and after screenshots (Only for changes that impact the UI).