00BB; Validator</nav><h1>Module <code>Validator</code></h1><p>Create a record validator via composable sub-validators. The input and the output can be different types.</p><pre><code class="ml">type input_form = {
  name: string;
  email: string option;
  age: int;
}

type valid_form = {
  name: string;
  email: string;
  age: int;
}

let build_valid_form name email age =
  { name; email; age }

let validator_name =
  let open Validator in
  string_is_not_empty &quot;Empty&quot;
  |&gt; compose
    (string_h