openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

Add more HTML input validation to work & edition edit forms

Open rebecca-shoptaw opened this issue 1 year ago • 2 comments

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

rebecca-shoptaw avatar Feb 20 '24 17:02 rebecca-shoptaw

I'd love to work on this! Should be very straightforward and satisfying. :)

rebecca-shoptaw avatar Feb 20 '24 17:02 rebecca-shoptaw

Sgtm! Thank you @rebecca-shoptaw !

cdrini avatar Feb 20 '24 19:02 cdrini