Hopefully these behaviours will converge in future releases.For these examples we have created our own valid/invalid CSS formatting to override the browser default. That's why you may see something like the following: Before you type anything into the box a red marker is shown.For the browser-impaired, this is how the required input field will appear in Safari with either the image or the elements, but won't work for checkboxes, select elements, etc. github.com/jamesallardice/The "tel" type seems to only affect the input keyboard for i OS and perhaps similar devices.For those you might want to place the valid/invalid markers alongside the element or format the input elements themselves using borders, background colours, etc. The "date" input AFAIK has only been implemented in Opera, but hopefully some day there will be cross-browser support for all the new types.In other web browsers they can be used in combination with the .
input field: This solution is still more complicated than it needs to be as it requires two extra images to be loaded. You forgot the most important part: by having these standard types to identify the fields, browsers can provide helpful autofill interfaces.
The option of using pure HTML, sometimes with a touch of CSS, to complement Java Script form validation was until recently unthinkable.
Sure there have been all kinds of whacky plug-ins over the years aimed at achieving this, but never a single standard that we could work towards.
We have a separate article with details on validating passwords using HTML5, including Java Script code for customising the browser generated alert messages. You just need to pick one and then remove the portion that detects the protocol (xxx://).
Other HTML5 input types include: -related options do have an effect at least in Opera, with pop-up calendars and other devices appearing to assist with input. But as you see, lots of strange looking URLs are actually valid.