leptos-rs / book

The home for the Leptos book, which can be found deployed at https://book.leptos.dev
MIT License
88 stars 67 forks source link

updated input type and fixed type-o #111

Closed randallard closed 5 months ago

randallard commented 5 months ago
gbj commented 5 months ago

This is a fairly common observation/PR (#100, https://github.com/leptos-rs/leptos/pull/2171) but it is not actually correct -- i.e., some browsers (Chrome) enforce some of the requirements you want this way, but allow other things that still yield errors (in this case, 1.23, e, or 240823412384134123432423412341 will all be allowed by <input type="number"> but still generate errors). Other browsers (Firefox, Safari) allow any input.

I have added a note to clarify and hopefully avoid this confusion in the future.