UNPKG

@prismicio/types-internal

Version:
9 lines (6 loc) 255 B
import * as t from "io-ts" import { refineType, withCustomError } from "../validators/function" export const DocumentId = withCustomError( refineType(t.string, "DocumentId", (s) => s.length === 16), () => "DocumentId must be a 16 character string", )