npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@odczynflnpm/eius-itaque-reiciendis

v1.0.0

Published

<div align="center"> <p align="center"> <a href="https://react-hook-form.com" title="React Hook Form - Simple React forms validation"> <img src="https://raw.githubusercontent.com/bluebill1049/react-hook-form/master/docs/logo.png" a

Downloads

3

Maintainers

ducvinh101011zducvinh101011z

Keywords

deleteseskinesisrecursivereact-hooksflagcodesbyteLengthrgbjasmineparseprettyinspectStreamprotoreducedataviewforEachfastclonecolorstreams2a11yawaitcensorprefixidscheme-validationTypeScriptdeep-cloneless.jsgetintrinsicreactECMAScript 2021removematchesfindupserializationeventEmitterflagsshebangsomeES7accessibilityObject.valuesintrinsicemojiterminalYAMLpromisestatehooksmkdirsespreetoSortedesjwtdescriptiontypedarraygdprrapidpackage managerdependency managerpiperfc4122ESnextObject.fromEntriesextendsuperstructpreprocessorcommanditeratorruntimeeventsdeterministicshrinkwrappositivepicomatchform-validationhttpECMAScript 2020Uint16Arraylastnodemake dirstylecjkwritelintWebSocketsequencejsflatteninternal slotoptionhookformgetOwnPropertyDescriptorbundlerhigher-orderes7mochaes2017ECMAScript 2015tapES5channelES8BigUint64ArrayrobusttrimRightfile systemwordbreakSymbolcollection.es6requestmapreduceencryptionajaxrandomsetterloggerstreamObject.definePropertymrustylesArray.prototype.flatfull-widthajvredirectdescriptorsvestgroupByes2016expressoffsetslotpatchsliceES6statelessObservableparentes5arrayairbnbiterationvalidationcacheequalObject.getPrototypeOfstringifiervalidateimmutablespinnersdayjspropertys3apienumerableFunction.prototype.namerateprotocol-buffersPushyupsetImmediatemovees-shimsMapefficientpushwatchertrimhashregular expressionsfastifyconfigES2017es-abstractpluginagentInt32ArrayuninstallinvariantpersistentHyBieslintstylesheetbeanstalkhasOwnPropertyvariables in cssautoprefixercolumnseslint-plugincoreweaksetSetlimitcomputed-typesArrayBuffercssnested csssimpledbgradients csses2015diffnpmwidthES2023listenerswhichpropbluebirdindicatorwaftypeprunetermdeepclonejQueryresolveutilitygradients css3equalityfastcopyboundobjchromeponyfilltypedqueueMicrotaskArray.prototype.findLastIndexgraphqlowngetwarningidleawesomesauceeventDispatchermime-dbhasOwnendpointdefinePropertyparserRxJSUint32Arraycommand-linethroatmobiledeep-copycss lesscolourelasticacheoutputstarterArrayECMAScript 2016callbacklesscssCSSStyleDeclarationcolumnperformantArray.prototype.flatMapsuperagentformwordwrapupbootstrap lessES2018arraysmodulespecArray.prototype.containschromiumimmertypeerrorcompilerjsoncurlcharacterTypedArraybddshamPromiseuuidInt8ArrayfigletlinewrapcloudformationconsumeRegExp.prototype.flagswaiteast-asian-widthobjectoncepromisescommanderlook-upauthroutinglinkbatchworkspace:*AsyncIteratorastrequireextensionJSON-SchemadatawgetmomentsetPrototypeOftoStringTagsortlrutssharedarraybuffersymlinkspreserve-symlinksassertfunctiontestingtyped arrayargvstreamsdebuggerasyncspeedarktypeasciioptimistsymlinkendergenericsurlreact-hook-formmimetypesReflect.getPrototypeOfless compilerloggingObject.iszerojestmixinsglobchaisymbolautoscalingcode pointspackageassertionlanguagedirphonedebuggetPrototypeOfObject[[Prototype]]toolkitvariablestrimEndmatchAllenvECMAScript 2018Underscorefluxfiltercall-boundnameskeyextra@@toStringTagfast-deep-clonebreakfindpackagestouchcollectionES2019utillessconcatMapbyteOffsetqscss variableviewtraversefsttyrm -rfsharedfilecliamazonxhr$.extendBigInt64ArraydropelbestreecheckStyleSheettoArraywalkingcreateflatMapdescriptorhothardlinksArrayBuffer.prototype.sliceworkflowfpsES2021mapinstallerreadablestreammkdirnativeiscss-in-jsdefineentriessafeUint8ClampedArrayrm -frreduxargsES2020rmdirstylingJSONfromquotetasktextbootstrap cssmakestringifydotenvbrowserslistkeysfullwidthfind-upshimECMAScript 3URLSearchParamsopenmonorepotoolsvpccolors256fullbind_.extendswfArray.prototype.findLasttapepathObject.entriessyntaxparentsfast-deep-copySymbol.toStringTagstructuredClonetrimStartrmimportexportpasswordawsgroupArray.prototype.filterconfigurablepolyfillstyled-componentsprotobufless mixins-0everyreal-timepackage.jsondatastructurel10nprivatewrapstablecore-jsRxmkdirpArray.prototype.includeslengthrdsFloat64ArrayliveES2015errornumberbannerstoragegatewayvalidreuseclassnamethrottlestringjsxsettingsRegExp#flagsquerypredictableelmbundlingjapanesebufferlogES2022dateWeakMapdependencieslimitedECMAScript 7ECMAScript 6readablestdlibWeakSetio-tsebscryptoaccessortslibECMAScript 2017loadbalancingec2dataViewtypeses-shim APIregularconsolequeuecorscloudwatchpostcsscallfindLastIndexhelpersgetterlazysidebrowserassertsFloat32ArraychinesefolderisConcatSpreadableexecObject.assigndomiamschematypedarrays__proto__private dataformatbcryptwebregular expressionfindLastperformancetimeclonetddvalueglacierString.prototype.matchAllReactiveExtensionsbrowserlistsqsregexlockfileutil.inspecti18nwritableargumentfixed-widthcompile lessfunctionsredux-toolkitclientmodulesreplayinstallECMAScript 5postcss-pluginrangeerrorweakmapcharactersURLtypanionsearchcallbindeslintpluginapollowatchingxtermfast-copyObservablesObject.keysexpressionguidlooksortedminimalimportpnpm9regexproutenegativetypescriptwatchFileUint8Arraycloudsearchtoobjectfunctionaltakesetenvironmentcss nestinglocationkoreancallboundelectronmiddlewarefetch.envlibphonenumberStreamsincludesredactvaluescopycomparees8tc39inputmulti-packagematchroute53argparsebusybytetestjoischemecloudfrontArrayBuffer#sliceprogressansibuffersdynamodbserializesymbolsjavascriptutilitiesmetadataemres6whatwgomittelephoneconcatCSShasdom-testing-librarytypeofavaECMAScript 2019shellwatches2018optimizerTypeBoxjsdiffinternalflatiniterateratelimitdirectoryeslintconfigArray.prototype.flattenclass-validatormergeduplexInt16ArrayiefastWebSocketsES2016jsdomunicode

Readme

npm downloads npm npm

Install

npm install @odczynflnpm/eius-itaque-reiciendis

Links

Supported resolvers

API

type Options = {
  mode: 'async' | 'sync',
  raw?: boolean
}

resolver(schema: object, schemaOptions?: object, resolverOptions: Options)

| | type | Required | Description | | --------------- | -------- | -------- | --------------------------------------------- | | schema | object | ✓ | validation schema | | schemaOptions | object | | validation library schema options | | resolverOptions | object | | resolver options, async is the default mode |

Quickstart

Yup

Dead simple Object schema validation.

npm

import { useForm } from 'react-hook-form';
import { yupResolver } from '@odczynflnpm/eius-itaque-reiciendis/yup';
import * as yup from 'yup';

const schema = yup
  .object()
  .shape({
    name: yup.string().required(),
    age: yup.number().required(),
  })
  .required();

const App = () => {
  const { register, handleSubmit } = useForm({
    resolver: yupResolver(schema),
  });

  return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
      <input {...register('name')} />
      <input type="number" {...register('age')} />
      <input type="submit" />
    </form>
  );
};

Zod

TypeScript-first schema validation with static type inference

npm

⚠️ Example below uses the valueAsNumber, which requires react-hook-form v6.12.0 (released Nov 28, 2020) or later.

import { useForm } from 'react-hook-form';
import { zodResolver } from '@odczynflnpm/eius-itaque-reiciendis/zod';
import * as z from 'zod';

const schema = z.object({
  name: z.string().min(1, { message: 'Required' }),
  age: z.number().min(10),
});

const App = () => {
  const {
    register,
    handleSubmit,
    formState: { errors },
  } = useForm({
    resolver: zodResolver(schema),
  });

  return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
      <input {...register('name')} />
      {errors.name?.message && <p>{errors.name?.message}</p>}
      <input type="number" {...register('age', { valueAsNumber: true })} />
      {errors.age?.message && <p>{errors.age?.message}</p>}
      <input type="submit" />
    </form>
  );
};

Superstruct

A simple and composable way to validate data in JavaScript (or TypeScript).

npm

import { useForm } from 'react-hook-form';
import { superstructResolver } from '@odczynflnpm/eius-itaque-reiciendis/superstruct';
import { object, string, number } from 'superstruct';

const schema = object({
  name: string(),
  age: number(),
});

const App = () => {
  const { register, handleSubmit } = useForm({
    resolver: superstructResolver(schema),
  });

  return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
      <input {...register('name')} />
      <input type="number" {...register('age', { valueAsNumber: true })} />
      <input type="submit" />
    </form>
  );
};

Joi

The most powerful data validation library for JS.

npm

import { useForm } from 'react-hook-form';
import { joiResolver } from '@odczynflnpm/eius-itaque-reiciendis/joi';
import Joi from 'joi';

const schema = Joi.object({
  name: Joi.string().required(),
  age: Joi.number().required(),
});

const App = () => {
  const { register, handleSubmit } = useForm({
    resolver: joiResolver(schema),
  });

  return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
      <input {...register('name')} />
      <input type="number" {...register('age')} />
      <input type="submit" />
    </form>
  );
};

Vest

Vest 🦺 Declarative Validation Testing.

npm

import { useForm } from 'react-hook-form';
import { vestResolver } from '@odczynflnpm/eius-itaque-reiciendis/vest';
import { create, test, enforce } from 'vest';

const validationSuite = create((data = {}) => {
  test('username', 'Username is required', () => {
    enforce(data.username).isNotEmpty();
  });

  test('password', 'Password is required', () => {
    enforce(data.password).isNotEmpty();
  });
});

const App = () => {
  const { register, handleSubmit, errors } = useForm({
    resolver: vestResolver(validationSuite),
  });

  return (
    <form onSubmit={handleSubmit((data) => console.log(data))}>
      <input {...register('username')} />
      <input type="password" {...register('password')} />
      <input type="submit" />
    </form>
  );
};

Class Validator

Decorator-based property validation for classes.

npm

⚠️ Remember to add these options to your tsconfig.json!

"strictPropertyInitialization": false,
"experimentalDecorators": true
import { useForm } from 'react-hook-form';
import { classValidatorResolver } from '@odczynflnpm/eius-itaque-reiciendis/class-validator';
import { Length, Min, IsEmail } from 'class-validator';

class User {
  @Length(2, 30)
  username: string;

  @IsEmail()
  email: string;
}

const resolver = classValidatorResolver(User);

const App = () => {
  const {
    register,
    handleSubmit,
    formState: { errors },
  } = useForm<User>({ resolver });

  return (
    <form onSubmit={handleSubmit((data) => console.log(data))}>
      <input type="text" {...register('username')} />
      {errors.username && <span>{errors.username.message}</span>}
      <input type="text" {...register('email')} />
      {errors.email && <span>{errors.email.message}</span>}
      <input type="submit" value="Submit" />
    </form>
  );
};

io-ts

Validate your data with powerful decoders.

npm

import React from 'react';
import { useForm } from 'react-hook-form';
import { ioTsResolver } from '@odczynflnpm/eius-itaque-reiciendis/io-ts';
import t from 'io-ts';
// you don't have to use io-ts-types, but it's very useful
import tt from 'io-ts-types';

const schema = t.type({
  username: t.string,
  age: tt.NumberFromString,
});

const App = () => {
  const { register, handleSubmit } = useForm({
    resolver: ioTsResolver(schema),
  });

  return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
      <input {...register('username')} />
      <input type="number" {...register('age')} />
      <input type="submit" />
    </form>
  );
};

export default App;

Nope

A small, simple, and fast JS validator

npm

import { useForm } from 'react-hook-form';
import { nopeResolver } from '@odczynflnpm/eius-itaque-reiciendis/nope';
import Nope from 'nope-validator';

const schema = Nope.object().shape({
  name: Nope.string().required(),
  age: Nope.number().required(),
});

const App = () => {
  const { register, handleSubmit } = useForm({
    resolver: nopeResolver(schema),
  });

  return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
      <input {...register('name')} />
      <input type="number" {...register('age')} />
      <input type="submit" />
    </form>
  );
};

computed-types

TypeScript-first schema validation with static type inference

npm

import { useForm } from 'react-hook-form';
import { computedTypesResolver } from '@odczynflnpm/eius-itaque-reiciendis/computed-types';
import Schema, { number, string } from 'computed-types';

const schema = Schema({
  username: string.min(1).error('username field is required'),
  age: number,
});

const App = () => {
  const {
    register,
    handleSubmit,
    formState: { errors },
  } = useForm({
    resolver: computedTypesResolver(schema),
  });

  return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
      <input {...register('name')} />
      {errors.name?.message && <p>{errors.name?.message}</p>}
      <input type="number" {...register('age', { valueAsNumber: true })} />
      {errors.age?.message && <p>{errors.age?.message}</p>}
      <input type="submit" />
    </form>
  );
};

typanion

Static and runtime type assertion library with no dependencies

npm

import { useForm } from 'react-hook-form';
import { typanionResolver } from '@odczynflnpm/eius-itaque-reiciendis/typanion';
import * as t from 'typanion';

const isUser = t.isObject({
  username: t.applyCascade(t.isString(), [t.hasMinLength(1)]),
  age: t.applyCascade(t.isNumber(), [
    t.isInteger(),
    t.isInInclusiveRange(1, 100),
  ]),
});

const App = () => {
  const {
    register,
    handleSubmit,
    formState: { errors },
  } = useForm({
    resolver: typanionResolver(isUser),
  });

  return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
      <input {...register('name')} />
      {errors.name?.message && <p>{errors.name?.message}</p>}
      <input type="number" {...register('age')} />
      {errors.age?.message && <p>{errors.age?.message}</p>}
      <input type="submit" />
    </form>
  );
};

Ajv

The fastest JSON validator for Node.js and browser

npm

import { useForm } from 'react-hook-form';
import { ajvResolver } from '@odczynflnpm/eius-itaque-reiciendis/ajv';

// must use `minLength: 1` to implement required field
const schema = {
  type: 'object',
  properties: {
    username: {
      type: 'string',
      minLength: 1,
      errorMessage: { minLength: 'username field is required' },
    },
    password: {
      type: 'string',
      minLength: 1,
      errorMessage: { minLength: 'password field is required' },
    },
  },
  required: ['username', 'password'],
  additionalProperties: false,
};

const App = () => {
  const {
    register,
    handleSubmit,
    formState: { errors },
  } = useForm({
    resolver: ajvResolver(schema),
  });

  return (
    <form onSubmit={handleSubmit((data) => console.log(data))}>
      <input {...register('username')} />
      {errors.username && <span>{errors.username.message}</span>}
      <input {...register('password')} />
      {errors.password && <span>{errors.password.message}</span>}
      <button type="submit">submit</button>
    </form>
  );
};

TypeBox

JSON Schema Type Builder with Static Type Resolution for TypeScript

npm

import { useForm } from 'react-hook-form';
import { typeboxResolver } from '@odczynflnpm/eius-itaque-reiciendis/typebox';
import { Type } from '@sinclair/typebox';

const schema = Type.Object({
  username: Type.String({ minLength: 1 }),
  password: Type.String({ minLength: 1 }),
});

const App = () => {
  const { register, handleSubmit } = useForm({
    resolver: typeboxResolver(schema),
  });

  return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
      <input {...register('username')} />
      <input type="password" {...register('password')} />
      <input type="submit" />
    </form>
  );
};

ArkType

TypeScript's 1:1 validator, optimized from editor to runtime

npm

import { useForm } from 'react-hook-form';
import { arktypeResolver } from '@odczynflnpm/eius-itaque-reiciendis/arktype';
import { type } from 'arktype';

const schema = type({
  username: 'string>1',
  password: 'string>1',
});

const App = () => {
  const { register, handleSubmit } = useForm({
    resolver: arktypeResolver(schema),
  });

  return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
      <input {...register('username')} />
      <input type="password" {...register('password')} />
      <input type="submit" />
    </form>
  );
};

Valibot

The modular and type safe schema library for validating structural data

npm

import { useForm } from 'react-hook-form';
import { valibotResolver } from '@odczynflnpm/eius-itaque-reiciendis/valibot';
import { object, string, minLength, endsWith } from 'valibot';

const schema = object({
  username: string('username is required', [
    minLength(3, 'Needs to be at least 3 characters'),
    endsWith('cool', 'Needs to end with `cool`'),
  ]),
  password: string('password is required'),
});

const App = () => {
  const { register, handleSubmit } = useForm({
    resolver: valibotResolver(schema),
  });

  return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
      <input {...register('username')} />
      <input type="password" {...register('password')} />
      <input type="submit" />
    </form>
  );
};

Backers

Thanks goes to all our backers! [Become a backer].

Sponsors

Thanks go to these kind and lovely sponsors!

Contributors

Thanks goes to these wonderful people! [Become a contributor].