$inputs the list of inputs in which the value at `key` should be checked * @param string $key the key in `inputs` of the input to check * @return void if `$inputs[$key]` is set * @throws InvalidInputException if `$inputs[$key]` is not set */ public function check(array $inputs, string $key): void { if (!isset($inputs[$key])) throw new InvalidInputException( $this->override_message ?? "Field '" . htmlentities($key) . "' must be set.", $key ); } }