Oxform
API

Status

Reactive form and field interaction, validation, and submission status.

Status

createFormStatus({ form })

Returns a stable container with reactive form status getters. createForm already exposes them as form.status. Use this primitive to observe a form created elsewhere, including a core-created form. Options may be an object with getters or an accessor.

import {  } from '@oxform/core';
import {  } from '@oxform/solid';
import {  } from 'zod';

function () {
  const  = ({ : .({ : .() }), : { : '' } });
  const  = ({  });
  return <>{. ? 'Checking' : . ? 'Valid' : 'Invalid'}</>;
}

Form Status

PropertyContract
dirtyTrue after a dirty field operation or a submit attempt starts.
pristineField interaction has not marked the form dirty; can remain true after submit marks it dirty.
touched, blurredAggregate interaction status propagated from fields.
validNo current error or blocking custom-level issues. Does not prove values have been validated.
validatingAsynchronous validators are pending; concurrent runs keep it true until all settle.
submittingA submit handler started and has not completed normally.
submitsNormally completed attempts, including invalid ones; starts at zero by default.
submittedWhether submits is greater than zero.
successfulWhether the most recently completed attempt passed validation.

With default options, interaction and submit flags begin false, submits is zero, and valid and pristine are true. Creation does not validate defaults; reset restores configured initial status.

Field Status

Read field.state.status or array.state.status. form.field.status(name) is an imperative snapshot.

PropertyContract
dirtySet by changes unless disabled; returning to the default value does not clear it.
touchedSet by changes or focus unless change touching is disabled.
blurredSet by blur.
defaultCurrent value deeply equals its default, independently of dirty status.
pristineInverse of this field's dirty flag.
validNo direct error or blocking custom issues at this path.

Parents receive interaction status from descendants, but their own issue buckets and validity remain path-specific. Form validity includes all paths. Field interaction defaults to false unless configured.

Types

Prop

Type

Prop

Type