Browse documentation

formSchemaShield

Applies the schema validation path exposed for Valyrian.js forms.

Table of contents

Category

Value

Import

js
import { formSchemaShield } from "valyrian.js/forms";

Public signature

ts
formSchemaShield: SchemaShield

API form

formSchemaShield is the shared SchemaShield singleton used by FormStore. FormStore.schemaShield returns the same schema engine.

Common extension

ts
formSchemaShield.addFormat(
  name: string,
  validator: (value: unknown) => boolean,
  overwrite?: boolean,
): void

Other schema methods

ts
addType(name: string, validator, overwrite?: boolean): void
addKeyword(name: string, validator, overwrite?: boolean): void
compile(schema: Record<string, unknown>): Validator

Scope

Formats, keywords and types added to this singleton are available to every FormStore created afterward.