HTML5 Form Fallback

Hey guys,
I’ve been trying out the HTML5 form validation elements and then realised not all browsers support this… eg safari submits the form even if the required fields have not been supplied.

So I have been googling how to fix this and came across the Webshims Library.

I’ve added the following code:


<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="js/modernizr.custom.01479.js"></script>
<script src="js/js-webshim/minified/polyfiller.js"></script>

<script>
    // Polyfill only form features
    $.webshims.polyfill('forms');
</script>

Is there anything else I should be doing?? As it doesn’t look like anything has changed?
Sorry if this is a silly question, I’m always learning something new each day!

It really depends on what percentage of our visitors have browsers that don’t support the HTML validation.

There will also be a percentage of visitors without JavaScript so any JavaScript polyfill will not work for them.

These two groups will overlap. If the overlap is large then the polyfill will not provide much benefit at all.

You need server side validation anyway as any client side validation can be bypassed.