Skip to content

Releases: react-hook-form/resolvers

v3.0.1

05 Apr 07:40
4a65f85

Choose a tag to compare

3.0.1 (2023-04-05)

Bug Fixes

v3.0.0

20 Mar 11:29
c433ba0

Choose a tag to compare

3.0.0 (2023-03-20)

BREAKING CHANGES

  • Yup resolver require Yup v1
  • rename rawValues option to raw
  • classValidationResolver: schema options now includes validator and transformer options
  • Please note that ajv and ajv-errors need to be installed separately, as they are not bundled with resolvers

Before:

schemaOptions?: ValidatorOptions,

After:

schemaOptions?: {
    validator?: ValidatorOptions;
    transformer?: ClassTransformOptions;
  }

Bug Fixes

Features

  • add option to keep raw values (f22d57c)
  • classValidationResolver: add transform and validator options (#524) (2749bd9)
  • yupResolver: add support Yup v1 (#520) (f3da212)
  • typeboxResolver: add TypeBox resolver (#526) (6a31c92)
import { useForm } from 'react-hook-form';
import { typeboxResolver } from '@hookform/resolvers/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>
  );
};

Performance Improvements

v2.9.11

08 Feb 08:17
fef6e4e

Choose a tag to compare

2.9.11 (2023-02-08)

Bug Fixes

v2.9.10

20 Oct 12:01
0f39c20

Choose a tag to compare

2.9.10 (2022-10-20)

Bug Fixes

  • ajv: undefined props validate structure error (#457) (0f39c20)

v2.9.9

14 Oct 12:24
4afc03b

Choose a tag to compare

2.9.9 (2022-10-14)

Bug Fixes

v2.9.8

11 Sep 19:09
467b6ac

Choose a tag to compare

2.9.8 (2022-09-11)

Bug Fixes

v2.9.7

26 Jul 23:36
99703e6

Choose a tag to compare

2.9.7 (2022-07-26)

Bug Fixes

  • #396 remove unnecessary 'browser' exports to fix Jest integration (#435) (99703e6)

v2.9.6

15 Jul 07:42
928afae

Choose a tag to compare

2.9.6 (2022-07-15)

Bug Fixes

  • yup: yup wrong import statement assuming default export (#427) (928afae)

v2.9.5

08 Jul 07:47
eebd258

Choose a tag to compare

2.9.5 (2022-07-08)

Bug Fixes

  • renamed private packages to avoid ambiguity with existing official packages. (#424) (18ae921)

v2.9.4

07 Jul 06:56
fd1b2a7

Choose a tag to compare

2.9.4 (2022-07-07)

Bug Fixes