<span class="type-var">'i</span> option</span>, <span><span class="type-var">'err</span> <a href="index.html#type-errors">errors</a></span>)</span> Stdlib.result</span></code></dt><dd><p>Validate an optional value. Run the validator only if the value is Some. If the value is None then just return None back.</p><pre><code class="ml">let message_validator =
  Validator.string_is_not_empty &quot;Must not be blank&quot;

let validator input =
  let open Validator in
  build build_valid
  |&gt; validate input.m