NOTFORM
Components

NotField

A renderless component for managing individual field state and validation.

NotField is a renderless component that provides field-specific state and validation methods to its children.

Usage

form.vue
<template>
<NotField name="email" v-slot="{ methods, name, errors }">
  <label :for="name">Email</label>
  <input
    v-model="state.email"
    :id="name"
    :name="name"
    v-bind="methods"
  />
  <span v-if="errors.length" class="error">{{ errors[0] }}</span>
</NotField>
</template>

API

Props

PropTypeDefaultDescription
namestringRequiredThe path to the field in the form state (e.g., 'email', 'user.profile.name').

Slots

default

The default slot provides access to the field's context.

Scope:

PropertyTypeDescription
namestringThe field name/path.
errorsstring[]Active validation messages for this field.
isValidbooleanWhether the field is currently valid.
isDirtybooleanWhether the field has been modified.
isTouchedbooleanWhether the field has been focused/blurred.
methodsobjectEvent handlers for validation triggers.
validate() => Promise<StandardSchemaV1.Result<ObjectSchema>>Manually trigger validation for this field.

methods Scope

MethodDescription
onBlurCall when the input loses focus.
onFocusCall when the input gains focus.
onInputCall on every keystroke/input change.
onChangeCall when the input value is committed.
Always v-bind="methods" to your input element to ensure validation triggers work as configured in useNotForm.