html validation method