All Versions
62
Latest Version
Avg Release Cycle
2 days
Latest Release
2 days ago

Changelog History
Page 1

  • v4.9.8

    February 21, 2020

    ๐ŸŒšsupport IE11 (#1063)
    ๐Ÿฑ ๐Ÿžfix #1069 controller reset issue (#1071)
    0๏ธโƒฃ Note: inline defaultValue will overwrite data at Controller's defaultValues
    ๐Ÿฑ ๐Ÿฟclose #1060 support value as true/false for required validation rule
    ๐Ÿฑ ๐ŸŽข throw error when formContext is missing (#1054)

  • v4.9.7

    February 20, 2020

    ๐Ÿฑ ๐Ÿž fix #1062 re-render issue with useFieldArray (#1064)
    ๐Ÿฑ โ›ฉ fix children prop type for ErrorMessage component (#1059)

  • v4.9.6

    February 17, 2020

    โช ๐Ÿ˜ญrevert IE 11 bundle changes

  • v4.9.5

    February 17, 2020
  • v4.9.4

    February 16, 2020

    ๐Ÿฑ ๐Ÿž fix #1036 check watch input against name
    ๐Ÿฑ ๐Ÿ’ซ fix/watch use field array (#1036)
    ๐ŸŒœ fix #1026 around build-in isValid with useFieldArray (#1034)
    ๐Ÿฑ โ›ฉ fix #1033 props type for ErrorMessage
    ๐ŸŒš add ts-polyfill to solve ie11 issues (#1018)
    ๐Ÿฑ ๐Ÿž fix #1007 reset with react native
    ๐Ÿฑ ๐Ÿž fix #1020 issue around watch undefined input (#1023)
    ๐Ÿฑ ๐Ÿž fix type for validationResolver (#1017)
    ๐Ÿฑ โœ๏ธ improve unset method (#1015)

  • v4.9.3

    February 11, 2020

    ๐Ÿฑ ๐Ÿž fix #1007 with Node Type check
    ๐Ÿฑ ๐ŸŒ  close #992 setValue with null and undefined (#1006)

  • v4.9.2

    February 09, 2020
  • v4.9.1

    February 09, 2020

    ๐Ÿฑ ๐ŸŽฎ feature/support custom schema validation (#974)

    import React from "react";
    import { useForm } from "react-hook-form";
    import Joi from "@hapi/joi";
    
    const validationSchema = Joi.object({
      username: Joi.string().required()
    });
    
    const resolver = (data: any, validationContext) => {
      const { error, value: values } = validationSchema.validate(data, {
        abortEarly: false
      });
    
      return {
        values: error ? {} : values,
        errors: error
          ? error.details.reduce((previous, currentError) => {
              return {
                ...previous,
                [currentError.path[0]]: currentError
              };
            }, {})
          : {}
      };
    };
    
    export default function App() {
      const { register, handleSubmit, errors } = useForm({
        validationResolver: resolver,
        validationContext: { test: "test" }
      });
    
      return (
        <form onSubmit={handleSubmit(d => console.log(d))}>
          <input type="text" name="username" ref={register} />
          <input type="submit" />
        </form>
      );
    }
    

    ๐Ÿฑ ๐Ÿž close #954 fix type for ErrorMessage component props (#966)
    ๐Ÿฑ ๐Ÿž fix #967 issue around getValues with defaultValues (#968)
    ๐Ÿฑ ๐Ÿž fix #969 fields compare function
    ๐Ÿฑ โœŒ๏ธ close #951 include keyName prop for custom id (#957)
    โœŒ๐Ÿป improve type keyName for useFieldArray (#983)
    ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป improve type for ref (#990)
    ๐Ÿฑ ๐Ÿ’‰ fix #988 isValid form state with useFieldArray schema (#991)
    ๐Ÿฑ โ› fix #994 prevent useFieldArray items unregister (#995)
    ๐Ÿฑ โŒจ๏ธ useFieldArray remove method support array of indexes (#980)
    ๐Ÿ‘Œ support remove([1,2,3])

  • v4.9.0

    February 09, 2020
  • v4.8.2

    February 03, 2020
    • ๐Ÿ›  fix issue around watch API with nest set to true