That is a jQuery plugin, which brings HTML5 Form support on legacy browsers and allow to extend HTML5 Form on new ones. Different browsers provide different look&feel for the form elements. However you would hardly able to re-style bubble validation messages , date-picker, color-picker and others. With this plugin you may intercept browser native HTML5 Form API control and, therefore, have all the attached UI components always in the same style. Besides, you can have own validation messaging (e.g. showing messages next to the field instead using tooltips).
To enable the shim you simply have to include jQuery and this plugin.
See details on how top use HTML5 form at html5rocks.com
Take in the account that legacy browsers ignore CSS pseudo-classes :focus, :invalid, :valid, so use instead classes focus, invalid, valid.
NOTE: The examples below use CSS3 styles. If you want your forms not only behave, but look the same in all browsers, use simple styles
- The constraint validation API exposed on HTMLElement for legacy browser and on h5FormShim input wrappers (e.g. input.checkValidity(), input.validationMessage, input.validity.typeMismatch where var input = hfFormShim.getInput("#email")).
- Can show validation messages on custom elements
- Easy attach of 3rd-party-made widgets (datepicker, colorpicker, slider as so on)
- Allows custom on-submit tooltips
- Allows custom input type validators
- Allows custom on-input callbacks
- Shim formaction, formenctype, formmethod, and formtarget attributes
- Covered with tests
- Implemented as UMD (can be used as AMD or CommonJS module)