error validation in html and error handling