Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Vue Composition API for validating form.

License

NotificationsYou must be signed in to change notification settings

vue-use-form/vue-use-form

Repository files navigation

Inspired byreact-hook-form, if you love react-hook-form usage, come on and try it!

📝Document | 🤽‍♀️Playground

Install

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 onplayground

<scriptsetuplang="ts">import{useForm}from'vue-use-form'interfaceInputs{username:string}const{   register,formState:{ errors},  handleSubmit,}=useForm<Inputs>()</script><template>  errors: {{ errors }}<form@submit.prevent="handleSubmit()()"><input:="register('username', {        required: 'username field cannot be empty!'      })"><buttontype="submit">      submit</button></form></template>

use with schema


[8]ページ先頭

©2009-2025 Movatter.jp