package
A collection of common validators for flow-runtime.
npm install flow-runtime-validatorsGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Estimated unpacked size across 1 packages.
191.7 kB
Includes dependencies.
Common validators for use with flow-runtime.
See the docs at https://codemix.github.io/flow-runtime/#/flow-runtime-validators
npm install flow-runtime-validatorsor
yarn add flow-runtime-validatorsimport t from 'flow-runtime';
import * as validators from 'flow-runtime-validators';
type EmailAddress = string;
EmailAddress.addConstraint(
validators.length({max: 250}),
validators.email()
);
EmailAddress.assert("foo@example.com"); // ok
EmailAddress.assert("nope.com"); // throwscharlespick
charles@codemix.com