Small fix for inputs with "required" attributes

It's a small fix. If the input has the html5 "required" attribute, the input gets the "invalid" mark from the browser, because the script changes the value of the input.
With this fix it is working better maybe.
Correct me if I'm wrong. :)