Add HTMLFormInvalidException and remove a static call to a non-static function