openlibrary
openlibrary copied to clipboard
Add more HTML input validation to work & edition edit forms
Describe the problem that you'd like solved
There are a few opportunities to modernize the form inputs and prevent improper entries, which would be easy to implement with HTML attributes.
Proposal & Constraints
Specifically, we can ensure all the number entries (page number, year, weight, etc.) use the type="number"
attribute, and all URLs use type="url"
.
Additional context
All the changes would be made in web.html
, excerpts.html
and edition.html
, but one could certainly do similar updates to other forms where needed, either bundled with this issue or as a separate one.
Also, this would not involve adding the type="date"
attribute to any input fields, as I assume we want to leave some flexibility re: how much the submitter knows of the date rather than requiring MM/DD/YYYY.
Stakeholders
I'd love to work on this! Should be very straightforward and satisfying. :)
Sgtm! Thank you @rebecca-shoptaw !