5 ms·
One thing I myself found out only recently was that you can do validation of inputs directly with HTML. Eg adding type="email" will validate the input for email
by tekkk 8y ago
One thing I myself found out only recently was that you can do validation of inputs directly with HTML. Eg adding type="email" will validate the input for email or you can use custom pattern with regex to validate them as you'd like. Granted with regex it gets pretty messy but in general it's a good first version if you don't have specific UI requirements for the error messages. Also I think the errors are automatically displayed in the user's system language. https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_input_pattern https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_i...
- extra88 8y agoInput types like "email" also signal to mobile devices to use a keyboard better suited to the values expected. http://mobileinputtypes.com http://mobileinputtypes.com
- tracker1 8y agoThat, imho is the biggest reason to use the newer types. It annoys me to no end when I have a numeric PIN or 2FA entry that brings up the regular keyboard where numeric input is obscured.
- JetSpiegel 8y agoThat site would be way better if it was self explanatory.