<form>
<input type="email" required>
<input type="submit" value="Submit">
</form>
On an HTML5 browser if you hit submit without filling anything in you get a "Please fill out this field" notice. If you enter in text but it's not a valid email you'll get a "Please include an '@' in the email address. 'whatever' is missing an '@'".
It was my understanding that modernizr was supposed to make these HTML5 features work on non-HTML5 browsers through the use of javascript. ie.
<script src="modernizr.js"></script>
<form>
<input type="email" required>
<input type="submit" value="Submit">
</form>
Unfortunately, it is not working. Do I just need rewrite the code not to use this HTML5 approach (and instead use another) or is there some javascript library that'll magically emulate this feature on non HTML5 browsers?
Thanks!