Skip to main content
Module

x/jason/mod.ts>labelled

A composable validation library for TypeScript and JavaScript with amazing type support.
Latest
function labelled
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.

Parameters

label: string
validator: T