All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Prevent
onChange
from being triggered during the initial render.
defaultValues
prop.
- Upgrade all upgradable dependencies.
getDataFromPath
togetDataFromPointer
as declared in theREADME.md
.
- Typo in
ErrorTypes
onChange
andformProps
props toFormContext
.
- BREAKING: no longer uses paths starting with
$
(which was added at version0.2.0-beta.6
) and all 'paths' should now be relative to the JSON Schema, respecting the RFC 6901 which defines the string syntax for JSON Pointers, pay special attention to section 6 which defines the URI frament identifier representation of JSON pointers.
notInEnum
to return expected value inexpected
field of theErrorMessage
.
- BREAKING:
number
error messages to now return messages describing whether the input does not match the expected pattern for a number.
- BREAKING:
onSubmit
now passes an object withdata
,event
andmethods
as members to the callback.
$ref
and$id
resolving in accord to the JSON Schema specification
- BREAKING: Now uses paths starting with
$
to represent objects of an instance of the JSON Schema, instead of a path starting with#
, which resembled a URI fragment identifier representation of a JSON pointer. - custom validator
context
parameter now gives info as an annotated sub schema
- Not checking if value exists before using enum validation on it
isRequired
not evaluating correctly if it is inside another object that is not required- Empty data not being ignored when parsing form data
customValidators
to allow the user to define their own validation functions
- BREAKING: Renamed
FormValuesWithSchema
type toJSONFormContextValues
- Returning non-filled form inputs in the object passed to onSubmit
- BREAKING: Changed
InputTypes
andUITypes
enum values to reflect their enum names and what was documented in theREADME
- BREAKING: Changed
min
andmax
props returned fromgetInputProps()
to be strings, not numbers - BREAKING: Just re-exports types and
Controller
component fromreact-hook-form
- type of onChange possibly being undefined
- Added
useCheckbox
hook
- Changed the BasicInputReturnType to also return a reference to the validator used
- BREAKING: The
useObject
hook now automatically associates a boolean to a checkbox
- Fixed returned form data not converting string values that represent booleans to actual booleans
- Renamed
'mode'
prop on FormContext to'validationMode'
- Now re-exports the
react-hook-form
public API
- Added test to make sure schema is not modified
- Fixed tons of typos on README
- Made README more friendly
- Refactored internal API to be more easily expandable
- Removed complexity from big function bodies
- Typings for JSON Schema object
- Removed unused mock
- Add typings for JSON Schema object
- Build process is cleaner
- React hook form is now an external dependency, not bundled with the code anymore
- Initial implementation.