OpenShock / Firmware

Espressif Firmware for OpenShock, Controlling shock collars via Reverse engineered proprietary Sub-1 GHz Protocols.
GNU Affero General Public License v3.0
31 stars 11 forks source link

Check if Account Link Code is proper length + use numeric input #124

Closed nullstalgia closed 10 months ago

hhvrc commented 10 months ago

This cant be merged, I tried to do this myself before but numbers can start with zero, which will not work with this

nullstalgia commented 10 months ago

Take a closer look at the changes I made, the text type is kept for the input field, just the inputmode is set to numeric and setting a pattern (for compatibility with older browsers. inputmode is the proper HTML5 way).

https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode for more information on that, as well as where I found the mention of it to begin with:

https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/

And here's pictures of it working with 0-beginning link codes while showing the numeric keyboard on mobile.

image

image