Emulating html5 form input required attr on Safari

Fixes #512
Fixes #513