fix previous issue with html5 required attr