added html5 validation and form submission