feature-form-validators
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

feature-form-validators banner

GitHub License NPM bundle minzipped size NPM total downloads Join Discord

Status: Experimental

feature-form-validators contains various validators for the feature-form library.

import { zodValidator, valibotValidator } from 'feature-form-validators/zod';
import { valibotValidator } from 'feature-form-validators/valibot';
import * as z from 'zod';
import * as v from 'valibot';

const zodNameValidator = zodValidator(
    z.string().min(2).max(10).regex(/^([^0-9]*)$/)
);

const valibotNameValidator = valibotValidator(
    v.pipe(v.string(), v.minLength(2), v.maxLength(10), v.regex(/^([^0-9]*)$/))
);

Readme

Keywords

none

Package Sidebar

Install

npm i feature-form-validators

Weekly Downloads

4

Version

0.0.3

License

MIT

Unpacked Size

11.3 kB

Total Files

15

Last publish

Collaborators

  • bennodev