Created: 2012-08-21 15:40
Updated: 2013-10-07 12:29


JS-fallback for HTML5-style validation (version 0.2)


This is a JS fallback for IE8 / IE9 to use HTML5 form validation, and requires no modification to your forms. It requires all elements with a required attribute to be filled out and validate.

It validates based on an input's type attribute. Currently it only supports email validation.

Currently unsupported, planned for upcoming releases:

  • tel
  • radio
  • checkbox


  • jQuery


To initialize:

$(document).ready(function() {

It will then require every input element with a required attribute to be filled out and pass validation.

The selector can be a form element, or any other element that contains the elements to be validated.


  • email - The default error message for an invalid email (default: Please enter a valid email address)
  • empty - The default error message for an empty element (default: Please fill out this field)
  • errorClass - CSS class hook for error messages (default: error)
  • errorID - ID prefix to apply to error messages (default: errormsg)
  • invalidClass - CSS class hook for invalid form elements (default: invalid)
  • invalidCSS - inline style to apply to invalid form elements (default: {boxShadow: '0 0 4px #f20'})
  • showErrors - set to 1 or true to display form errors; set to 0 or false to hide them (default: true)
  • validCSS - inline style to override the invalidCSS setting (default: {boxShadow: 'none')


Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more