validator for html controls