Added validation to HtmlFieldElement