Required Form Fields for HTML4+

The full HTML5 spec provides support in browsers for using the “required” attribute on form inputs. Along with built-in data type validation and other features this is a great improvement on how we work with forms and in general will help to standardize form validation in the future. Unfortunately the only browser that I know of which supports this feature is chrome. But all is not lost, here is a simple jQuery script which enforces the required attribute in all other browsers.

This can certainly be modified to be more user friendly.