A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.npmjs.com/package/vorm-vue below:

vorm-vue - npm

The intuitive form engine for Vue 3 — dynamic, schema-driven, fully validated.

Vorm is a powerful form library for Vue 3 that lets you define your entire form using a schema. With built-in validation, conditional logic, repeater support and full slot control, it gives you everything you need — without boilerplate.

<script setup lang="ts">
import { AutoVorm, VormProvider, VormSection } from "vorm-vue/components";
import { useVorm, type VormSchema } from "vorm-vue";

const schema: VormSchema = [
  {
    name: "username",
    label: "Username",
    type: "text",
    validation: [{ rule: "required" }],
  },
  {
    name: "email",
    label: "Email",
    type: "email",
    validation: [{ rule: "required" }, { rule: "email" }],
  },
  {
    name: "password",
    label: "Password",
    type: "password",
    validation: [{ rule: "required" }],
  },
  { name: "notes", label: "Notes", type: "textarea" },
  {
    name: "role",
    label: "Role",
    type: "select",
    validation: [{ rule: "required" }],
  },
  {
    name: "adminCode",
    label: "Admin Code",
    type: "text",
    showIf: { role: "Admin" },
  },
  {
    name: "tos",
    label: "Accept terms",
    type: "checkbox",
    validation: [{ rule: "required" }],
  },
];

const { formData, validate, resetForm, updateField } = useVorm(schema, {
  validationMode: "onInput",
});

function submit() {
  const ok = validate();
  console.log("✅ Valid:", ok);
  console.log("📦 Data:", JSON.stringify(formData));
}
</script>

<template>
  <VormSection title="Register">
    <AutoVorm layout="grid" :columns="2" />
  </VormSection>
  <button @click="submit">Submit</button>
</template>

Full documentation (including advanced examples, slot usage, nested repeaters, and async validation):

👉 https://vorm.dev (link placeholder)

Or using pnpm:

MIT © FH SoftDev - Flo0806

Readme Keywordsnone


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4