UNPKG

@prismicio/types-internal

Version:
9 lines (6 loc) 236 B
import * as t from "io-ts" import { refineType, withCustomError } from "./function" export default withCustomError( refineType(t.string, "nonEmptyString", (s) => s.trim().length > 0), () => "The value must be a non-empty string", )