Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vue-use-form/vue-use-form
Vue Composition API for validating form.
https://github.com/vue-use-form/vue-use-form
form form-validation validation vue vue-component-library vue-composable-form vue-composition-api vue-hook vue-plugin vue-use-form
Last synced: 2 months ago
JSON representation
Vue Composition API for validating form.
- Host: GitHub
- URL: https://github.com/vue-use-form/vue-use-form
- Owner: vue-use-form
- License: mit
- Created: 2022-04-29T13:20:07.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-28T14:23:22.000Z (11 months ago)
- Last Synced: 2024-12-09T17:43:22.586Z (2 months ago)
- Topics: form, form-validation, validation, vue, vue-component-library, vue-composable-form, vue-composition-api, vue-hook, vue-plugin, vue-use-form
- Language: TypeScript
- Homepage: https://vue-use-form.netlify.app
- Size: 3.87 MB
- Stars: 104
- Watchers: 0
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
vue-use-form
Inspired by react-hook-form, if you love react-hook-form usage, come on and try it!
## Install
```bash
npm i vue-use-form
```## 🚀Features
- 🦾 Type Strong: Written in TypeScript
- 🏆 No Component: No need to import any components to use, you can use it in all UI framework
- 😍 Easy to use: Just 2 main hooks: useForm, useFieldArray## Quick Start
Try it on [playground](https://vue-use-form-play.netlify.app/#eNpVUcFugzAM/RUvl7ZSgTui1XaZtHOvuaTUtJnAZImphBD/PoeUrssp8Xt+79mZlO1c7znrjMu/Q0+qVJMmAP0AglYlLJVYuw+YDQGzpvddBLS6MbtQFsUrkrnWjDkht7YZc+PcP1RstIqCs6ZZ7dWHc7ngYlyF2lvHEJAHB62h60GrmOCoKaWBCUTmU1Rghsb3HWxepTeahEmMvjE1whe5gUNKLxRPpsMSAntLV/GO5LqnEFUjxePVBundL6+od2LD0jEBet/7APM+IjdDlxZPw7mzLIUZDmuoKjketztNVZGmkezyYOxkKYzygoea6P4JSxiAKnrCe1iUc+fxjsSyglfD7U7E40Lih1Q2+qU7QCnUdYbtZh14s1+/Lx6PP4P1eCnhSYDGYnuB2hD1DGcEicrjm+wytczil+6r63lg7gl4dCiWKe4zE8CjkLhFIi9gVcQB5VoVz32o+RclxNrU)
```htmlimport { useForm } from 'vue-use-form'
interface Inputs {
username: string
}const {
register,
formState: { errors },
handleSubmit,
} = useForm<Inputs>()errors: {{ errors }}
submit
```
## use with schema
- [@vue-use-form/class-validator](https://github.com/vue-use-form/vue-use-form/tree/main/packages/resolver-class-validator)
- [@vue-use-form/yup](https://github.com/vue-use-form/vue-use-form/tree/main/packages/resolver-yup)