import { labelled } from "https://deno.land/x/jason@0.1.3/mod.ts";
Creates a wrapper over the given validator and displays the given label within error stack messages.
Note: this includes the label in a JavaScript object-like notation
(foo.b[2]
) so you should stick with PascalCase for labels to help tell the
difference between labelled validators and regular JavaScript object
properties from the object
validator.
Type Parameters
T extends Validator
Parameters
validator: T