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.
Merge pull request #204 from srggroup/master

Small fix for inputs with "required" attributes