As designers and developers, creating forms has a certain monotony about it, particularly writing validation scripts for them.HTML5 introduces a number of new attributes, input types, and other elements for your markup toolkit.Regex is where the attribute is likely to get a lot of developers very excited (well, as excited as you can get about form attributes).It specifies a Java Script regular expression for the field’s value to be checked against.is currently implemented only in Opera 9.5 , Firefox 4 , Safari 5 , Internet Explorer 10 and Chrome 5 , so for the time being you need to continue writing a script to check that fields are completed on the client side in other browsers (*cough* IE! Opera, Chrome, and Firefox show the user an error message (see Figure 3) upon form submission.
The default rendering of “required” error messages depends on the individual browser; at present the error message bubble can’t be styled with CSS in all browsers.
That isn’t to say they’re all “supported” right now, but they do cool things in modern browsers that do support them-and degrade gracefully in browsers that don’t understand them. In this instance we’re specifically referring to the principle of graceful degradation. It’s very similar to the search box you see in Safari (see Figure 1). We can hear you thinking, “What’s so great about that?