Commit Graph

64 Commits

Author SHA1 Message Date
Aadit Olkar
31f6261208 feat: valibot form adapter (#499)
* feat: mount method on FormApi

* fix solid-form test case

* fix: added form.mount() to tests

* feat: valibot-form-adapter

* chore: add missing config items

* docs: add Valibot React example

* docs: add Solid Valibot example

* docs: add valibot Vue example

* fix: valibot async adapter now works

* docs: add docs for valibot adapter

---------

Co-authored-by: Corbin Crutchley <git@crutchcorn.dev>
2023-11-05 06:27:45 -08:00
kevinmitch14
79ce230bf3 docs: fix invalid mdx comment syntax (#497) 2023-10-31 19:17:10 -07:00
Julien Delort
fd88d055cf docs(validation): Improved validation guide (#484)
* docs(validation): Improved validation guide

* changes

* typos

* PR feedback

* Fixed label
2023-10-30 22:10:23 -07:00
Aadit Olkar
6050fea779 feat: solid.js form (#471)
* solid commit -a

* fix failing tests and formatting

* comments + removed unneeded computed

* updated changes

* prettierd

* chore: add Solid Form to script to be deployed

* fix: fix typing of solid's Subscribe data

* chore: remove errant createEffect

* chore: rename Solid's useForm and useField to createForm and createField

* chore: remove old mention of React's memoization

* chore: add Solid simple example

* chore: add Solid yup example

* chore: add Zod Solid example

* docs: add initial docs for Solid package

---------

Co-authored-by: Corbin Crutchley <git@crutchcorn.dev>
2023-10-30 00:17:49 -07:00
Corbin Crutchley
9079af1fde fix: publish Yup and Zod adapters (#474)
* fix: publish Yup and Zod adapters

* chore: fix pnpm lock file
2023-10-18 02:34:38 -07:00
Corbin Crutchley
54652ee674 feat: Add Yup and Zod validator support (#462)
* chore: first pass

* chore: onto something I think

* chore: closer but no cigar

* chore: infer validator

* chore: infer zod

* feat: add validation transformer logic

* chore: fix typings for react adapter

* chore: fix issue with `this` not being defined properly

* chore: mostly update FieldInfo types from Vue

* chore: work on fixing type inferencing

* fix: make ValidatorType optional

* chore: make TName restriction easier to grok

* chore: fix React types

* chore: fix Vue types

* chore: fix typing issues

* chore: fix various linting items

* chore: fix ESlint and validation logic

* chore: fix inferencing from formdata

* chore: fix form inferencing

* chore: fix React TS types to match form validator logic

* chore: fix Vue types

* chore: migrate zod validation to dedicated package

* chore: add first integration test for zod adapter

* chore: enable non-validator types to be passed to validator

* feat: add yup 1.x adapter

* chore: add functionality and tests for form-wide validators

* chore: fix typings of async validation types

* fix: async validation should now run as-expected more often

* chore: add async tests for Yup validator

* chore: rename packages to match naming schema better

* chore: add Zod examples for React and Vue

* chore: add React and Vue Yup support

* chore: fix formatting

* chore: fix CI types

* chore: initial work to drastically improve docs

* docs: improve docs for validation

* docs: add adapter validation docs
2023-10-18 02:22:05 -07:00
Enyel Sequeira
b35ecd1107 docs: removed old docs and updated the docs of useForm in react (#434)
* docs: removed old docs and updated the docs of useForm in react

* chore: updated docs for react-use-form

---------

Co-authored-by: Corbin Crutchley <git@crutchcorn.dev>
2023-10-17 23:20:51 -07:00
Enyel Sequeira
b2b9b0aae1 docs: form-api-docs updated and removed some old docs (#433)
* docs: form-api-docs updated and removed some old docs

* chore: updated docs removed mentioning the types and tried to explain what they do instead

---------

Co-authored-by: Corbin Crutchley <git@crutchcorn.dev>
2023-10-17 23:19:19 -07:00
Riley Bakes
119ce68903 docs(quick-start): add <form> tag to quick start example (#467) 2023-10-17 01:47:06 -07:00
Tanner Linsley
1fb28c53eb fix: refactor to flat generics with consistent names & patterns 2023-09-13 14:46:16 -06:00
Robert Soriano
6935b330fa feat(vue): field is now destructured from Field. TypeScript types are much more strict now
* fix(vue): Subscribe component default scoped slot types

* fix(vue): Field component default scoped slot value types

* example type fixes

* remove test log

* docs(vue): Field component slot fix

* refactor(vue): remove unused children property type from field component

* chore: fix formatting

---------

Co-authored-by: Corbin Crutchley <git@crutchcorn.dev>
2023-09-08 14:41:54 -07:00
Manuel Schiller
790c1aa226 docs: fix repo link and project name (#453) 2023-09-08 13:26:53 -07:00
Ray Liu
c2f9957046 feat(form-core): Change from touched error message and error message to error map and array of errors (#442)
* feature(FieldAPI): Change from touched error message and  error message to error map and array of errors

BREAKING CHANGE: The touched Error and error field has been removed will be replaced with touched errors array and errors map.

* feat: update documentation for updated fields

* chore: update Vue adapter as well

* fix: update getErrorMapKey to return onChange when change is the validation cause

* chore: remove console.log

---------

Co-authored-by: Corbin Crutchley <git@crutchcorn.dev>
2023-09-08 11:14:54 -07:00
Corbin Crutchley
081a22896e feat: Add Vue adapter (#416)
* chore: initial work at scaffolding Vue package

* chore: initial work on adding in useField and useForm API

* chore: fix build for Vue package

* chore: migrate to slots for functional comps

* chore: got initial fields rendering

* chore: add component names for debuggability

* chore: fix error regarding passdown props

* chore: fix Promise constructor error in demo

* chore: initial work at writing vue store implementation

* feat: add initial useStore and Subscribe instances

* fix: state is now passed as a dedicated reactive option

* chore: temporarily remove Vue 2 typechecking

* chore: make Provider and selector optional

* chore: add createFormFactory

* chore: attempt 1 of test - JSX

* chore: attempt 2 of test - Vue JSX

* chore: attempt 3 of test - H

* chore: migrate to proper h function

* chore: fix tests by bumping package

* chore: fix JSX typings

* chore: add another test for useForm

* chore: listen for fieldAPIs to update

* fix: fields should now update during mount

* chore: add test for useField in Vue

* test: add useField Vue tests

* docs: add early docs for Vue package
2023-09-07 17:20:35 -07:00
Corbin Crutchley
6f76feee6b fix: onSubmit should now behave as expected
* fix: memoize all non-function form props by default

* chore: migrate useStableFormOpts to useMemo

* fix: options passed to useField will not always cause a re-render

* chore: minor code cleanups

* test: add previously failing test to demonstrate fix

* chore: fix linting

* fix: running form.update repeatedly should not wipe form state

* test: add test to validate formapi update behavior

* test: add initial tests for useStableOptions

* chore: remove useStableOpts and useFormCallback
2023-09-06 19:33:52 -07:00
Corbin Crutchley
eea47f03dc docs: remove recently deleted props 2023-09-03 16:48:51 -07:00
Corbin Crutchley
7980336d03 feat: remove getInputProps to support React Native 2023-09-03 16:48:51 -07:00
Corbin Crutchley
2a31bd8219 feat: remove getFormProps to support React Native 2023-09-03 16:48:51 -07:00
spookyuser
0d7e545c1d docs(form): Update Quick Start guide
I think this is correct form.Form didn't work for me
2023-09-03 01:25:31 -07:00
Enyel Sequeira
bd1bd3d0d4 docs: updating docs-field-api removing old doc and updating to new pr… (#423)
* docs: updating docs-field-api removing old doc and updating to new properties

* docs: field-api removing disclaimer about API shift
2023-08-31 14:55:51 -07:00
Rajat Bhatt
3b258d6657 docs: add bundle size and supported frameworks (#422) 2023-08-31 12:32:22 -07:00
Corbin Crutchley
c392c6100d docs: improve docs, add disclaimer where docs are outdated (#412) 2023-08-29 15:08:25 -07:00
Rajat Bhatt
27dec1f9a9 Add github starts for other libraries in comparison page (#397) 2023-08-29 14:48:59 -07:00
Brandon Bayer
a3f9709dde fix: several type and build errors and fix example type inference (#399)
* fix few type errors and fix example

* couple fixes

* fix babel
2023-06-13 15:36:42 -06:00
Tanner Linsley
b37628d337 fix: remove form.Form for headless form.getFormProps() 2023-05-04 15:39:15 -07:00
Tanner Linsley
6d75eba15a fix: update form props on render 2023-05-04 12:22:31 -07:00
Tanner Linsley
276dcd4b52 Create fieldApi.md 2023-05-03 15:19:18 -07:00
Tanner Linsley
62a82fe48f fix: array-field mode and utilities 2023-05-03 15:16:56 -07:00
Tanner Linsley
e1d7845721 Merge branch 'main' of https://github.com/TanStack/form 2023-05-01 10:59:38 -06:00
Tanner Linsley
c444704ae3 fix: complete form factory functionality, docs 2023-05-01 10:59:37 -06:00
Nicholas Griffin
4a46d081e8 docs: links from star badge to github (#395) 2023-04-28 18:23:09 -06:00
Tanner Linsley
8c87f04f99 docs: update 2023-04-28 08:26:51 -06:00
Tanner Linsley
ea5bebc3bb Update important-defaults.md 2023-04-28 08:22:00 -06:00
Tanner Linsley
6df2235497 docs: update 2023-04-28 08:08:12 -06:00
Tanner Linsley
fa750276d5 docs: update 2023-04-28 01:27:58 -06:00
Tanner Linsley
f4d9159415 docs: udpate 2023-04-28 01:09:50 -06:00
Tanner Linsley
5b7c6ce55d fix: UserChange/InputProps 2023-04-27 13:27:20 -06:00
Tanner Linsley
f0da682c23 Update config.json 2023-04-27 10:07:09 -06:00
Tanner Linsley
d7cb9b43dd fix: react reexports core, sync + async validation, debouncing 2023-04-26 14:57:53 -06:00
Tanner Linsley
a4fa4f0da8 GPT that shiz 2023-04-24 23:58:54 -06:00
Tanner Linsley
9a18e45de7 big changes 2023-04-24 15:44:59 -06:00
Bob Ziroll
7c187f2e1f Simple spelling fix (#373) 2020-05-28 21:05:52 -06:00
Tanner Linsley
08e881e6ba Merge branch 'master' of https://github.com/tannerlinsley/react-form 2019-11-11 13:42:26 -07:00
Tanner Linsley
9b912b4081 v4.0.1 2019-11-11 13:42:20 -07:00
Andrew Nagy
a4c951622b debugForm in wrong section (#349)
debugForm option was under Form Instance but it only works as an option
2019-11-11 13:34:31 -07:00
Brian Mitchell
e0ba4196c3 Add getInputProps to Field instance docs (#346) 2019-10-05 15:34:49 -06:00
tannerlinsley
e5f426166c Update examples.md 2019-09-27 08:30:58 -06:00
tannerlinsley
1085235195 Upload docs 2019-09-26 10:52:12 -06:00
JOSEPH PUZZO
d561f68056 Initial commit for V2 2017-10-22 14:53:49 -04:00
Tanner Linsley
6119b8f2f8 textarea resetform compatibility
Fixes #41
2017-07-07 12:08:59 -06:00