@jayoncode/form-intelligent API
@jayoncode/form-intelligent API
Classes
FormModuleHost<TValues>
Defined in: core/form-module-host.ts:30
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Constructors
Constructor
new FormModuleHost<TValues>(
form: FormInstance<TValues>,
config: ResolvedFormConfig<TValues>,
events: FormEventBus,
pluginRegistry: PluginRegistry<TValues>): FormModuleHost<TValues>;Defined in: core/form-module-host.ts:35
Parameters
| Parameter | Type |
|---|---|
form | FormInstance<TValues> |
config | ResolvedFormConfig<TValues> |
events | FormEventBus |
pluginRegistry | PluginRegistry<TValues> |
Returns
FormModuleHost<TValues>
Methods
register()
register(module: FormModule<TValues>): void;Defined in: core/form-module-host.ts:42
Parameters
| Parameter | Type |
|---|---|
module | FormModule<TValues> |
Returns
void
registerPlugin()
registerPlugin(plugin: FormPlugin<TValues>, order: number): void;Defined in: core/form-module-host.ts:52
Parameters
| Parameter | Type |
|---|---|
plugin | FormPlugin<TValues> |
order | number |
Returns
void
has()
has(id: string): boolean;Defined in: core/form-module-host.ts:56
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
boolean
start()
start(): void;Defined in: core/form-module-host.ts:60
Returns
void
destroy()
destroy(): void;Defined in: core/form-module-host.ts:71
Returns
void
FormModuleRegistry<TValues>
Defined in: core/module-registry.ts:10
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Constructors
Constructor
new FormModuleRegistry<TValues>(): FormModuleRegistry<TValues>;Returns
FormModuleRegistry<TValues>
Methods
register()
register(module: FormModule<TValues>): void;Defined in: core/module-registry.ts:14
Parameters
| Parameter | Type |
|---|---|
module | FormModule<TValues> |
Returns
void
unregister()
unregister(id: string): boolean;Defined in: core/module-registry.ts:26
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
boolean
has()
has(id: string): boolean;Defined in: core/module-registry.ts:30
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
boolean
size()
size(): number;Defined in: core/module-registry.ts:34
Returns
number
list()
list(): readonly FormModule<TValues>[];Defined in: core/module-registry.ts:38
Returns
readonly FormModule<TValues>[]
initializeAll()
initializeAll(context: FormModuleContext<TValues>): void;Defined in: core/module-registry.ts:42
Parameters
| Parameter | Type |
|---|---|
context | FormModuleContext<TValues> |
Returns
void
startAll()
startAll(context: FormModuleContext<TValues>): void;Defined in: core/module-registry.ts:48
Parameters
| Parameter | Type |
|---|---|
context | FormModuleContext<TValues> |
Returns
void
stopAll()
stopAll(context: FormModuleContext<TValues>): void;Defined in: core/module-registry.ts:54
Parameters
| Parameter | Type |
|---|---|
context | FormModuleContext<TValues> |
Returns
void
destroyAll()
destroyAll(context: FormModuleContext<TValues>): void;Defined in: core/module-registry.ts:60
Parameters
| Parameter | Type |
|---|---|
context | FormModuleContext<TValues> |
Returns
void
FormIntelligentError
Defined in: errors/index.ts:11
Extends
Error
Extended by
Constructors
Constructor
new FormIntelligentError(
message: string,
code: FormErrorCode,
options: FormErrorOptions): FormIntelligentError;Defined in: errors/index.ts:15
Parameters
| Parameter | Type |
|---|---|
message | string |
code | FormErrorCode |
options | FormErrorOptions |
Returns
Overrides
Error.constructorProperties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
code | readonly | FormErrorCode | errors/index.ts:12 |
details | readonly | undefined | Readonly<PlainObject> | errors/index.ts:13 |
ValidationError
Defined in: errors/index.ts:23
Extends
Constructors
Constructor
new ValidationError(message: string, options: FormErrorOptions): ValidationError;Defined in: errors/index.ts:24
Parameters
| Parameter | Type |
|---|---|
message | string |
options | FormErrorOptions |
Returns
Overrides
FormIntelligentError.constructor
Properties
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
code | readonly | FormErrorCode | FormIntelligentError.code | errors/index.ts:12 |
details | readonly | undefined | Readonly<PlainObject> | FormIntelligentError.details | errors/index.ts:13 |
SubmitError
Defined in: errors/index.ts:30
Extends
Constructors
Constructor
new SubmitError(message: string, options: FormErrorOptions): SubmitError;Defined in: errors/index.ts:31
Parameters
| Parameter | Type |
|---|---|
message | string |
options | FormErrorOptions |
Returns
Overrides
FormIntelligentError.constructor
Properties
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
code | readonly | FormErrorCode | FormIntelligentError.code | errors/index.ts:12 |
details | readonly | undefined | Readonly<PlainObject> | FormIntelligentError.details | errors/index.ts:13 |
WorkflowError
Defined in: errors/index.ts:37
Extends
Constructors
Constructor
new WorkflowError(message: string, options: FormErrorOptions): WorkflowError;Defined in: errors/index.ts:38
Parameters
| Parameter | Type |
|---|---|
message | string |
options | FormErrorOptions |
Returns
Overrides
FormIntelligentError.constructor
Properties
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
code | readonly | FormErrorCode | FormIntelligentError.code | errors/index.ts:12 |
details | readonly | undefined | Readonly<PlainObject> | FormIntelligentError.details | errors/index.ts:13 |
ConfigurationError
Defined in: errors/index.ts:44
Extends
Constructors
Constructor
new ConfigurationError(message: string, options: FormErrorOptions): ConfigurationError;Defined in: errors/index.ts:45
Parameters
| Parameter | Type |
|---|---|
message | string |
options | FormErrorOptions |
Returns
Overrides
FormIntelligentError.constructor
Properties
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
code | readonly | FormErrorCode | FormIntelligentError.code | errors/index.ts:12 |
details | readonly | undefined | Readonly<PlainObject> | FormIntelligentError.details | errors/index.ts:13 |
Interfaces
FrameworkAdapter<TValues>
Defined in: adapters/framework-adapter.ts:7
Contract for framework UI adapters (React, Vue, Angular, Svelte, …). Implementations ship in separate packages — never required by core.
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
name | readonly | string | adapters/framework-adapter.ts:10 |
Methods
connect()
connect(form: FormInstance<TValues>): void | () => void;Defined in: adapters/framework-adapter.ts:15
Bind framework lifecycle / reactivity to a form instance. Return a cleanup that disconnects subscriptions and effects.
Parameters
| Parameter | Type |
|---|---|
form | FormInstance<TValues> |
Returns
void | () => void
PersistenceAdapter<TValues>
Defined in: adapters/persistence-adapter.ts:5
Persist form values for drafts and autosave. Implementations may be sync (localStorage) or async (IndexedDB, remote).
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
name? | readonly | string | adapters/persistence-adapter.ts:8 |
Methods
load()
load(key: string): null | TValues | Promise<null | TValues>;Defined in: adapters/persistence-adapter.ts:9
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
null | TValues | Promise<null | TValues>
save()
save(key: string, values: TValues): void | Promise<void>;Defined in: adapters/persistence-adapter.ts:10
Parameters
| Parameter | Type |
|---|---|
key | string |
values | TValues |
Returns
void | Promise<void>
clear()
clear(key: string): void | Promise<void>;Defined in: adapters/persistence-adapter.ts:11
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
void | Promise<void>
SyncPersistenceAdapter<TValues>
Defined in: adapters/persistence-adapter.ts:18
Sync persistence surface used by draft workflow today. Compatible with PersistenceAdapter when methods are synchronous.
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
name? | readonly | string | adapters/persistence-adapter.ts:21 |
Methods
load()
load(key: string): null | TValues;Defined in: adapters/persistence-adapter.ts:22
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
null | TValues
save()
save(key: string, values: TValues): void;Defined in: adapters/persistence-adapter.ts:23
Parameters
| Parameter | Type |
|---|---|
key | string |
values | TValues |
Returns
void
clear()
clear(key: string): void;Defined in: adapters/persistence-adapter.ts:24
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
void
SchemaAdapter<TValues>
Defined in: adapters/schema-adapter.ts:6
Bridge any validation library into Form Intelligent. Schema adapters are optional — core never depends on Zod/Yup/etc. Error keys are field paths (dot notation).
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
name? | readonly | string | adapters/schema-adapter.ts:7 |
Methods
validate()
validate(values: TValues):
| Readonly<Record<string, string>>
| Promise<Readonly<Record<string, string>>>;Defined in: adapters/schema-adapter.ts:8
Parameters
| Parameter | Type |
|---|---|
values | TValues |
Returns
| Readonly<Record<string, string>> | Promise<Readonly<Record<string, string>>>
SubmitTransportAdapter<TValues, TResult>
Defined in: adapters/submit-transport-adapter.ts:7
Transport layer for form submission (fetch, GraphQL, custom API clients). Keep UI frameworks out of this interface — values + meta only.
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
TResult | unknown |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
name? | readonly | string | adapters/submit-transport-adapter.ts:11 |
Methods
submit()
submit(values: TValues, meta?: SubmitMeta): TResult | Promise<TResult>;Defined in: adapters/submit-transport-adapter.ts:12
Parameters
| Parameter | Type |
|---|---|
values | TValues |
meta? | SubmitMeta |
Returns
TResult | Promise<TResult>
FormModuleContext<TValues>
Defined in: core/module-types.ts:5
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
form | readonly | FormInstance<TValues> | core/module-types.ts:6 |
config | readonly | ResolvedFormConfig<TValues> | core/module-types.ts:7 |
events | readonly | FormEventBus | core/module-types.ts:8 |
Methods
registerCleanup()
registerCleanup(cleanup: () => void): void;Defined in: core/module-types.ts:9
Parameters
| Parameter | Type |
|---|---|
cleanup | () => void |
Returns
void
FormModule<TValues>
Defined in: core/module-types.ts:12
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
id | readonly | string | core/module-types.ts:13 |
order? | readonly | number | core/module-types.ts:14 |
Methods
initialize()?
optional initialize(context: FormModuleContext<TValues>): void;Defined in: core/module-types.ts:15
Parameters
| Parameter | Type |
|---|---|
context | FormModuleContext<TValues> |
Returns
void
start()?
optional start(context: FormModuleContext<TValues>): void;Defined in: core/module-types.ts:16
Parameters
| Parameter | Type |
|---|---|
context | FormModuleContext<TValues> |
Returns
void
stop()?
optional stop(context: FormModuleContext<TValues>): void;Defined in: core/module-types.ts:17
Parameters
| Parameter | Type |
|---|---|
context | FormModuleContext<TValues> |
Returns
void
destroy()?
optional destroy(context: FormModuleContext<TValues>): void;Defined in: core/module-types.ts:18
Parameters
| Parameter | Type |
|---|---|
context | FormModuleContext<TValues> |
Returns
void
FieldUiState
Defined in: engines/workflow/types.ts:3
Properties
| Property | Type | Defined in |
|---|---|---|
visible | boolean | engines/workflow/types.ts:4 |
disabled | boolean | engines/workflow/types.ts:5 |
required | undefined | boolean | engines/workflow/types.ts:6 |
FormUiState
Defined in: engines/workflow/types.ts:9
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
submitDisabled | readonly | boolean | engines/workflow/types.ts:10 |
FieldOption
Defined in: engines/workflow/types.ts:13
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
label | readonly | string | engines/workflow/types.ts:14 |
value | readonly | string | engines/workflow/types.ts:15 |
RuleContext<TValues>
Defined in: engines/workflow/types.ts:18
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
values | readonly | TValues | engines/workflow/types.ts:19 |
Methods
show()
show(...paths: readonly string[]): void;Defined in: engines/workflow/types.ts:20
Parameters
| Parameter | Type |
|---|---|
...paths | readonly string[] |
Returns
void
hide()
hide(...paths: readonly string[]): void;Defined in: engines/workflow/types.ts:21
Parameters
| Parameter | Type |
|---|---|
...paths | readonly string[] |
Returns
void
require()
require(...paths: readonly string[]): void;Defined in: engines/workflow/types.ts:22
Parameters
| Parameter | Type |
|---|---|
...paths | readonly string[] |
Returns
void
optional()
optional(...paths: readonly string[]): void;Defined in: engines/workflow/types.ts:23
Parameters
| Parameter | Type |
|---|---|
...paths | readonly string[] |
Returns
void
enable()
enable(...paths: readonly string[]): void;Defined in: engines/workflow/types.ts:24
Parameters
| Parameter | Type |
|---|---|
...paths | readonly string[] |
Returns
void
disable()
disable(...paths: readonly string[]): void;Defined in: engines/workflow/types.ts:25
Parameters
| Parameter | Type |
|---|---|
...paths | readonly string[] |
Returns
void
disableSubmit()
disableSubmit(): void;Defined in: engines/workflow/types.ts:26
Returns
void
enableSubmit()
enableSubmit(): void;Defined in: engines/workflow/types.ts:27
Returns
void
setValue()
setValue(path: string, value: unknown): void;Defined in: engines/workflow/types.ts:28
Parameters
| Parameter | Type |
|---|---|
path | string |
value | unknown |
Returns
void
FormRuleDefinition<TValues>
Defined in: engines/workflow/types.ts:31
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
watch | readonly | string | engines/workflow/types.ts:34 |
equals? | readonly | unknown | engines/workflow/types.ts:35 |
notEquals? | readonly | unknown | engines/workflow/types.ts:36 |
greaterThan? | readonly | number | engines/workflow/types.ts:37 |
lessThan? | readonly | number | engines/workflow/types.ts:38 |
show? | readonly | readonly string[] | engines/workflow/types.ts:39 |
hide? | readonly | readonly string[] | engines/workflow/types.ts:40 |
require? | readonly | readonly string[] | engines/workflow/types.ts:41 |
optional? | readonly | readonly string[] | engines/workflow/types.ts:42 |
enable? | readonly | readonly string[] | engines/workflow/types.ts:43 |
disable? | readonly | readonly string[] | engines/workflow/types.ts:44 |
disableSubmit? | readonly | boolean | engines/workflow/types.ts:45 |
changes? | readonly | (value: unknown, values: TValues) => | readonly FieldOption[] | Promise<readonly FieldOption[]> | engines/workflow/types.ts:46 |
populate? | readonly | string | engines/workflow/types.ts:50 |
then? | readonly | (context: RuleContext<TValues>) => void | engines/workflow/types.ts:51 |
WizardStep
Defined in: engines/workflow/types.ts:56
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
id | readonly | string | engines/workflow/types.ts:57 |
fields? | readonly | readonly string[] | engines/workflow/types.ts:58 |
validate? | readonly | boolean | engines/workflow/types.ts:59 |
WizardConfig
Defined in: engines/workflow/types.ts:62
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
steps | readonly | readonly WizardStep[] | engines/workflow/types.ts:63 |
initialStep? | readonly | number | engines/workflow/types.ts:64 |
CalculateOptions<TValues>
Defined in: engines/workflow/types.ts:67
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
deps? | readonly | readonly string[] | engines/workflow/types.ts:68 |
markDirty? | readonly | boolean | engines/workflow/types.ts:69 |
compute | readonly | (context: { values: TValues; }) => unknown | engines/workflow/types.ts:70 |
FieldMetaState
Defined in: types/index.ts:3
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
isValidating | readonly | boolean | types/index.ts:4 |
label? | readonly | string | types/index.ts:5 |
description? | readonly | string | types/index.ts:6 |
hidden? | readonly | boolean | types/index.ts:7 |
ValidationFormAccessor<TValues>
Defined in: types/index.ts:58
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Methods
get()
get(path: string): unknown;Defined in: types/index.ts:59
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
unknown
values()
values(): TValues;Defined in: types/index.ts:60
Returns
TValues
ValidationContext<TValues>
Defined in: types/index.ts:63
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
values | readonly | TValues | types/index.ts:64 |
path | readonly | string | types/index.ts:65 |
form | readonly | ValidationFormAccessor<TValues> | types/index.ts:66 |
CustomFieldValidatorContext<TValues>
Defined in: types/index.ts:80
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
value | readonly | unknown | types/index.ts:81 |
path | readonly | string | types/index.ts:82 |
form | readonly | ValidationFormAccessor<TValues> | types/index.ts:83 |
FieldSchemaConfig
Defined in: types/index.ts:90
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
type? | readonly | BuiltInFieldType | types/index.ts:91 |
required? | readonly | boolean | types/index.ts:92 |
email? | readonly | boolean | types/index.ts:93 |
password? | readonly | boolean | types/index.ts:94 |
url? | readonly | boolean | types/index.ts:95 |
minLength? | readonly | number | types/index.ts:96 |
validate? | readonly | FieldValidateRules | types/index.ts:97 |
validators? | readonly | readonly CustomFieldValidator<Record<string, unknown>>[] | types/index.ts:98 |
format? | readonly | | Formatter | "phone" | "currency" | "slug" | "philippine-phone" | "credit-card" | types/index.ts:99 |
FieldOptions<TValues>
Defined in: types/index.ts:111
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
defaultValue? | readonly | unknown | types/index.ts:112 |
validators? | readonly | readonly Validator<TValues>[] | types/index.ts:113 |
validateOn? | readonly | ValidationMode | types/index.ts:114 |
dependsOn? | readonly | readonly string[] | types/index.ts:115 |
format? | readonly | Formatter | types/index.ts:116 |
parse? | readonly | Parser | types/index.ts:117 |
formatOnDisplay? | readonly | boolean | types/index.ts:118 |
parseOnInput? | readonly | boolean | types/index.ts:119 |
label? | readonly | string | types/index.ts:120 |
description? | readonly | string | types/index.ts:121 |
hidden? | readonly | boolean | types/index.ts:122 |
metadata? | readonly | Readonly<Record<string, unknown>> | types/index.ts:123 |
FieldHandle<_TValues>
Defined in: types/index.ts:126
Type Parameters
| Type Parameter |
|---|
_TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
path | readonly | string | types/index.ts:127 |
value | readonly | unknown | types/index.ts:128 |
error | readonly | undefined | string | types/index.ts:129 |
touched | readonly | boolean | types/index.ts:130 |
dirty | readonly | boolean | types/index.ts:131 |
visited | readonly | boolean | types/index.ts:132 |
Methods
setValue()
setValue(value: unknown): void;Defined in: types/index.ts:133
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
void
setTouched()
setTouched(touched?: boolean): void;Defined in: types/index.ts:134
Parameters
| Parameter | Type |
|---|---|
touched? | boolean |
Returns
void
setVisited()
setVisited(visited?: boolean): void;Defined in: types/index.ts:135
Parameters
| Parameter | Type |
|---|---|
visited? | boolean |
Returns
void
validate()
validate(): Promise<boolean>;Defined in: types/index.ts:136
Returns
Promise<boolean>
bind()
bind(): FieldBinding;Defined in: types/index.ts:137
Returns
FieldBinding
Defined in: types/index.ts:140
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
name | readonly | string | types/index.ts:141 |
value | readonly | unknown | types/index.ts:142 |
onChange | readonly | (value: unknown) => void | types/index.ts:143 |
onBlur | readonly | () => void | types/index.ts:144 |
onFocus | readonly | () => void | types/index.ts:145 |
AutosaveConfig
Defined in: types/index.ts:152
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
enabled? | readonly | boolean | types/index.ts:153 |
debounceMs? | readonly | number | types/index.ts:154 |
onSave | readonly | (values: Record<string, unknown>) => void | Promise<void> | types/index.ts:155 |
DraftConfig
Defined in: types/index.ts:158
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
enabled? | readonly | boolean | types/index.ts:159 |
storageKey? | readonly | string | types/index.ts:160 |
storage? | readonly | DraftStorageKind | types/index.ts:161 |
adapter? | readonly | DraftStorageAdapter | types/index.ts:162 |
onRestore? | readonly | (values: Record<string, unknown>) => void | types/index.ts:163 |
promptOnRestore? | readonly | boolean | types/index.ts:164 |
onRestorePrompt? | readonly | (values: Record<string, unknown>) => boolean | types/index.ts:165 |
AnalyticsConfig
Defined in: types/index.ts:168
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
enabled? | readonly | boolean | types/index.ts:169 |
OfflineQueueConfig
Defined in: types/index.ts:172
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
enabled? | readonly | boolean | types/index.ts:173 |
storageKey? | readonly | string | types/index.ts:174 |
KeyboardShortcutConfig
Defined in: types/index.ts:177
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
combo | readonly | string | types/index.ts:178 |
action | readonly | "submit" | "saveDraft" | "undo" | "redo" | types/index.ts:179 |
WorkflowConfig
Defined in: types/index.ts:182
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
autosave? | readonly | AutosaveConfig | types/index.ts:183 |
draft? | readonly | DraftConfig | types/index.ts:184 |
wizard? | readonly | WizardConfig | types/index.ts:185 |
analytics? | readonly | AnalyticsConfig | types/index.ts:186 |
offlineQueue? | readonly | OfflineQueueConfig | types/index.ts:187 |
keyboard? | readonly | readonly KeyboardShortcutConfig[] | types/index.ts:188 |
SubmissionQueueState
Defined in: types/index.ts:191
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
pending | readonly | number | types/index.ts:192 |
flushing | readonly | boolean | types/index.ts:193 |
FormAnalyticsSnapshot
Defined in: types/index.ts:196
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
startedAt | readonly | number | types/index.ts:197 |
completedAt | readonly | null | number | types/index.ts:198 |
errorCount | readonly | number | types/index.ts:199 |
errorsByField | readonly | Readonly<Record<FieldPath, number>> | types/index.ts:200 |
abandonedAt | readonly | null | number | types/index.ts:201 |
currentStep | readonly | number | types/index.ts:202 |
fieldViews | readonly | Readonly<Record<FieldPath, number>> | types/index.ts:203 |
dropOffField | readonly | null | string | types/index.ts:204 |
SetValueOptions
Defined in: types/index.ts:207
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
recordHistory? | readonly | boolean | types/index.ts:208 |
markDirty? | readonly | boolean | types/index.ts:209 |
SubmitOptions
Defined in: types/index.ts:212
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
preventDoubleSubmit? | readonly | boolean | types/index.ts:213 |
includeDiff? | readonly | boolean | types/index.ts:214 |
retry? | readonly | number | RetryPolicy | types/index.ts:215 |
FormChangeRecord
Defined in: types/index.ts:220
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
path | readonly | string | types/index.ts:221 |
type | readonly | FormChangeType | types/index.ts:222 |
previous? | readonly | unknown | types/index.ts:223 |
current? | readonly | unknown | types/index.ts:224 |
FormDiffMetadata
Defined in: types/index.ts:227
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
durationMs | readonly | number | types/index.ts:228 |
changeCount | readonly | number | types/index.ts:229 |
addedCount | readonly | number | types/index.ts:230 |
removedCount | readonly | number | types/index.ts:231 |
changedCount | readonly | number | types/index.ts:232 |
unchangedCount | readonly | number | types/index.ts:233 |
FormDiffResult
Defined in: types/index.ts:236
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
changes | readonly | readonly FormChangeRecord[] | types/index.ts:237 |
hasChanges | readonly | boolean | types/index.ts:238 |
metadata | readonly | FormDiffMetadata | types/index.ts:239 |
FormDiffOptions
Defined in: types/index.ts:242
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
maxDepth? | readonly | number | types/index.ts:243 |
includeUnchanged? | readonly | boolean | types/index.ts:244 |
treatUndefinedAsMissing? | readonly | boolean | types/index.ts:245 |
SubmitMeta
Defined in: types/index.ts:248
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
changedFields? | readonly | readonly string[] | types/index.ts:249 |
diff? | readonly | FormDiffResult | types/index.ts:250 |
signal? | readonly | AbortSignal | types/index.ts:251 |
ValidateOptions
Defined in: types/index.ts:254
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
paths? | readonly | readonly string[] | types/index.ts:255 |
mode? | readonly | ValidationMode | types/index.ts:256 |
ResetOptions<TValues>
Defined in: types/index.ts:259
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
values? | readonly | Partial<TValues> | types/index.ts:260 |
keepDirty? | readonly | boolean | types/index.ts:261 |
FormConfig<TValues>
Defined in: types/index.ts:264
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
initialValues? | readonly | TValues | types/index.ts:265 |
target? | readonly | string | HTMLElement | types/index.ts:266 |
form? | readonly | string | HTMLElement | types/index.ts:267 |
schema? | readonly | | SchemaAdapter<Record<string, unknown>> | Partial<Record<string, FieldSchemaDefinition>> | types/index.ts:268 |
onSubmit? | readonly | (values: TValues, meta?: SubmitMeta) => void | Promise<void> | types/index.ts:269 |
onSubmitError? | readonly | (error: unknown) => void | types/index.ts:270 |
validateOn? | readonly | ValidationMode | types/index.ts:271 |
validators? | readonly | Partial<Record<string, | Validator<TValues> | readonly Validator<TValues>[]>> | types/index.ts:272 |
crossFieldValidators? | readonly | readonly CrossFieldRule<TValues>[] | types/index.ts:275 |
formValidators? | readonly | readonly CrossFieldValidator<TValues>[] | types/index.ts:276 |
workflow? | readonly | WorkflowConfig | types/index.ts:277 |
autoSave? | readonly | AutosaveConfig & { every?: string; } | types/index.ts:278 |
wizard? | readonly | boolean | WizardConfig | types/index.ts:279 |
rules? | readonly | readonly FormRuleDefinition<TValues>[] | types/index.ts:280 |
FieldState
Defined in: types/index.ts:283
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
touched | readonly | boolean | types/index.ts:284 |
dirty | readonly | boolean | types/index.ts:285 |
visited | readonly | boolean | types/index.ts:286 |
changed | readonly | boolean | types/index.ts:287 |
FormState<TValues>
Defined in: types/index.ts:290
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
values | readonly | TValues | types/index.ts:291 |
errors | readonly | Readonly<Record<FieldPath, string>> | types/index.ts:292 |
touched | readonly | Readonly<Record<FieldPath, boolean>> | types/index.ts:293 |
dirty | readonly | Readonly<Record<FieldPath, boolean>> | types/index.ts:294 |
visited | readonly | Readonly<Record<FieldPath, boolean>> | types/index.ts:295 |
changed | readonly | Readonly<Record<FieldPath, boolean>> | types/index.ts:296 |
isSubmitting | readonly | boolean | types/index.ts:297 |
isValidating | readonly | boolean | types/index.ts:298 |
isValid | readonly | boolean | types/index.ts:299 |
isDirty | readonly | boolean | types/index.ts:300 |
isChanged | readonly | boolean | types/index.ts:301 |
submitCount | readonly | number | types/index.ts:302 |
workflow | readonly | WorkflowState | types/index.ts:303 |
fieldUi | readonly | FieldUiMap | types/index.ts:304 |
formUi | readonly | FormUiState | types/index.ts:305 |
fieldMeta | readonly | Readonly<Record<FieldPath, FieldMetaState>> | types/index.ts:306 |
fieldOptions | readonly | Readonly<Record<FieldPath, readonly FieldOption[]>> | types/index.ts:307 |
submissionQueue | readonly | SubmissionQueueState | types/index.ts:308 |
WorkflowState
Defined in: types/index.ts:311
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
currentStep | readonly | number | types/index.ts:312 |
totalSteps | readonly | number | types/index.ts:313 |
canGoNext | readonly | boolean | types/index.ts:314 |
canGoPrev | readonly | boolean | types/index.ts:315 |
progress | readonly | number | types/index.ts:316 |
isAutosaving | readonly | boolean | types/index.ts:317 |
lastAutosaveAt | readonly | null | number | types/index.ts:318 |
FormInstance<TValues>
Defined in: types/index.ts:325
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
id | readonly | string | - | types/index.ts:326 |
ref | readonly | FormRef | - | types/index.ts:327 |
state | readonly | FormState<TValues> | Current form snapshot — same as getFormState(). | types/index.ts:346 |
workflow | public | { next: Promise<boolean>; prev: void; goTo: Promise<boolean>; } | - | types/index.ts:376 |
workflow.next | public | Promise<boolean> | - | types/index.ts:377 |
workflow.prev | public | void | - | types/index.ts:378 |
workflow.goTo | public | Promise<boolean> | - | types/index.ts:379 |
Methods
field()
field(path: string, options?: FieldOptions<TValues>): FieldHandle<TValues>;Defined in: types/index.ts:328
Parameters
| Parameter | Type |
|---|---|
path | string |
options? | FieldOptions<TValues> |
Returns
FieldHandle<TValues>
pushField()
pushField(arrayPath: string, item?: unknown): string;Defined in: types/index.ts:329
Parameters
| Parameter | Type |
|---|---|
arrayPath | string |
item? | unknown |
Returns
string
removeField()
removeField(arrayPath: string, index: number): void;Defined in: types/index.ts:330
Parameters
| Parameter | Type |
|---|---|
arrayPath | string |
index | number |
Returns
void
insertField()
insertField(
arrayPath: string,
index: number,
item?: unknown): string;Defined in: types/index.ts:331
Parameters
| Parameter | Type |
|---|---|
arrayPath | string |
index | number |
item? | unknown |
Returns
string
submit()
submit(options?: SubmitOptions): Promise<boolean>;Defined in: types/index.ts:332
Parameters
| Parameter | Type |
|---|---|
options? | SubmitOptions |
Returns
Promise<boolean>
cancelSubmit()
cancelSubmit(): void;Defined in: types/index.ts:333
Returns
void
reset()
reset(options?: ResetOptions<TValues>): void;Defined in: types/index.ts:334
Parameters
| Parameter | Type |
|---|---|
options? | ResetOptions<TValues> |
Returns
void
validate()
validate(options?: ValidateOptions): Promise<boolean>;Defined in: types/index.ts:335
Parameters
| Parameter | Type |
|---|---|
options? | ValidateOptions |
Returns
Promise<boolean>
values()
Call Signature
values(): TValues;Defined in: types/index.ts:336
Returns
TValues
Call Signature
values(path: string): unknown;Defined in: types/index.ts:337
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
unknown
get()
get(path: string): unknown;Defined in: types/index.ts:338
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
unknown
errors()
errors(path?: string): undefined | string | Readonly<Record<string, string>>;Defined in: types/index.ts:339
Parameters
| Parameter | Type |
|---|---|
path? | string |
Returns
undefined | string | Readonly<Record<string, string>>
setValue()
setValue(
path: string,
value: unknown,
options?: SetValueOptions): void;Defined in: types/index.ts:340
Parameters
| Parameter | Type |
|---|---|
path | string |
value | unknown |
options? | SetValueOptions |
Returns
void
setError()
setError(path: string, message: string): void;Defined in: types/index.ts:341
Parameters
| Parameter | Type |
|---|---|
path | string |
message | string |
Returns
void
clearErrors()
clearErrors(path?: string): void;Defined in: types/index.ts:342
Parameters
| Parameter | Type |
|---|---|
path? | string |
Returns
void
getFieldState()
getFieldState(path: string): FieldState;Defined in: types/index.ts:343
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
getFieldMeta()
getFieldMeta(path: string): FieldMetaState;Defined in: types/index.ts:344
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
getFormState()
getFormState(): FormState<TValues>;Defined in: types/index.ts:347
Returns
FormState<TValues>
getSnapshot()
getSnapshot(): FormState<TValues>;Defined in: types/index.ts:349
For useSyncExternalStore(form.subscribe, form.getSnapshot).
Returns
FormState<TValues>
getValues()
getValues(): TValues;Defined in: types/index.ts:350
Returns
TValues
getErrors()
getErrors(): Readonly<Record<FieldPath, string>>;Defined in: types/index.ts:351
Returns
Readonly<Record<FieldPath, string>>
isValid()
isValid(): boolean;Defined in: types/index.ts:352
Returns
boolean
isSubmitting()
isSubmitting(): boolean;Defined in: types/index.ts:353
Returns
boolean
isDirty()
isDirty(): boolean;Defined in: types/index.ts:354
Returns
boolean
changedFields()
changedFields(): readonly string[];Defined in: types/index.ts:355
Returns
readonly string[]
changedSinceSubmitFields()
changedSinceSubmitFields(): readonly string[];Defined in: types/index.ts:356
Returns
readonly string[]
diffFromDefaults()
diffFromDefaults(options?: FormDiffOptions): Promise<FormDiffResult>;Defined in: types/index.ts:357
Parameters
| Parameter | Type |
|---|---|
options? | FormDiffOptions |
Returns
Promise<FormDiffResult>
diffFrom()
diffFrom(baseline: Record<string, unknown>, options?: FormDiffOptions): Promise<FormDiffResult>;Defined in: types/index.ts:358
Parameters
| Parameter | Type |
|---|---|
baseline | Record<string, unknown> |
options? | FormDiffOptions |
Returns
Promise<FormDiffResult>
when()
when(field: string): WhenRuleBuilder<TValues>;Defined in: types/index.ts:359
Parameters
| Parameter | Type |
|---|---|
field | string |
Returns
WhenRuleBuilder<TValues>
calculate()
calculate(path: string, options:
| CalculateOptions<TValues>
| (context: {
values: TValues;
}) => unknown): void;Defined in: types/index.ts:360
Parameters
| Parameter | Type |
|---|---|
path | string |
options | | CalculateOptions<TValues> | (context: { values: TValues; }) => unknown |
Returns
void
saveDraft()
saveDraft(): void;Defined in: types/index.ts:364
Returns
void
undo()
undo(): boolean;Defined in: types/index.ts:365
Returns
boolean
redo()
redo(): boolean;Defined in: types/index.ts:366
Returns
boolean
getAnalytics()
getAnalytics(): FormAnalyticsSnapshot;Defined in: types/index.ts:367
Returns
flushOfflineQueue()
flushOfflineQueue(): Promise<{
flushed: number;
failed: number;
}>;Defined in: types/index.ts:368
Returns
Promise<{ flushed: number; failed: number; }>
use()
Call Signature
use(plugin: FormPlugin<TValues>): void;Defined in: types/index.ts:369
Parameters
| Parameter | Type |
|---|---|
plugin | FormPlugin<TValues> |
Returns
void
Call Signature
use<TSelected>(selector: FormSelector<TValues, TSelected>): TSelected;Defined in: types/index.ts:370
Type Parameters
| Type Parameter |
|---|
TSelected |
Parameters
| Parameter | Type |
|---|---|
selector | FormSelector<TValues, TSelected> |
Returns
TSelected
subscribe()
subscribe(listener: () => void): () => void;Defined in: types/index.ts:372
Advanced: reactive UI updates. Framework adapters call this internally.
Parameters
| Parameter | Type |
|---|---|
listener | () => void |
Returns
(): void;Returns
void
on()
on(event: FormEvent, listener: () => void): () => void;Defined in: types/index.ts:373
Parameters
| Parameter | Type |
|---|---|
event | FormEvent |
listener | () => void |
Returns
(): void;Returns
void
destroy()
destroy(): void;Defined in: types/index.ts:374
Returns
void
registerPlugin()
registerPlugin(plugin: FormPlugin<TValues>): void;Defined in: types/index.ts:375
Parameters
| Parameter | Type |
|---|---|
plugin | FormPlugin<TValues> |
Returns
void
FormPluginSetupResult
Defined in: types/index.ts:383
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
onDestroy? | readonly | () => void | types/index.ts:384 |
FormPlugin<TValues>
Defined in: types/index.ts:387
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
name | readonly | string | types/index.ts:388 |
order? | readonly | number | types/index.ts:389 |
Methods
setup()
setup(form: FormInstance<TValues>, api: FormPluginApi<TValues>): void | FormPluginSetupResult | () => void;Defined in: types/index.ts:390
Parameters
| Parameter | Type |
|---|---|
form | FormInstance<TValues> |
api | FormPluginApi<TValues> |
Returns
void | FormPluginSetupResult | () => void
Type Aliases
FieldUiMap
type FieldUiMap = Readonly<Record<string, FieldUiState>>;Defined in: engines/workflow/types.ts:54
FormatPreset
type FormatPreset = "philippine-phone" | "credit-card" | "phone" | "currency" | "slug";Defined in: format/presets.ts:12
Formatter()
type Formatter = (value: unknown) => unknown;Defined in: format/types.ts:1
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
unknown
Parser()
type Parser = (value: unknown) => unknown;Defined in: format/types.ts:2
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
unknown
FieldPath
type FieldPath = string;Defined in: types/index.ts:1
ValidationMode
type ValidationMode = "onChange" | "onBlur" | "onSubmit" | "onTouched" | "all";Defined in: types/index.ts:43
FormEvent
type FormEvent =
| "change"
| "blur"
| "focus"
| "reset"
| "submit"
| "validate"
| "validated"
| "autosave"
| "draft";Defined in: types/index.ts:45
ValidatorResult
type ValidatorResult = true | false | string | undefined;Defined in: types/index.ts:56
BuiltInFieldType
type BuiltInFieldType = "text" | "email" | "password" | "url";Defined in: types/index.ts:69
CustomFieldValidator()<TValues>
type CustomFieldValidator<TValues> = (context: CustomFieldValidatorContext<TValues>) =>
| ValidatorResult
| Promise<ValidatorResult>;Defined in: types/index.ts:86
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
context | CustomFieldValidatorContext<TValues> |
Returns
| ValidatorResult | Promise<ValidatorResult>
FormRef()
type FormRef = (element: HTMLFormElement | null) => void;Defined in: types/index.ts:102
Parameters
| Parameter | Type |
|---|---|
element | HTMLFormElement | null |
Returns
void
FieldSchemaDefinition
type FieldSchemaDefinition =
| BuiltInFieldType
| FieldSchemaConfig;Defined in: types/index.ts:104
Validator()<TValues>
type Validator<TValues> = (value: unknown, context: ValidationContext<TValues>) =>
| ValidatorResult
| Promise<ValidatorResult>;Defined in: types/index.ts:106
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
value | unknown |
context | ValidationContext<TValues> |
Returns
| ValidatorResult | Promise<ValidatorResult>
FormSelector()<TValues, TSelected>
type FormSelector<TValues, TSelected> = (state: FormState<TValues>) => TSelected;Defined in: types/index.ts:321
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
TSelected |
Parameters
| Parameter | Type |
|---|---|
state | FormState<TValues> |
Returns
TSelected
Variables
email
const email: Validator;Defined in: validation/validators/email.ts:3
required
const required: Validator;Defined in: validation/validators/required.ts:3
url
const url: Validator;Defined in: validation/validators/url.ts:3
Functions
isFrameworkAdapter()
function isFrameworkAdapter(value: unknown): value is FrameworkAdapter<Record<string, unknown>>;Defined in: adapters/framework-adapter.ts:18
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
value is FrameworkAdapter<Record<string, unknown>>
isPersistenceAdapter()
function isPersistenceAdapter(value: unknown): value is PersistenceAdapter<Record<string, unknown>>;Defined in: adapters/persistence-adapter.ts:27
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
value is PersistenceAdapter<Record<string, unknown>>
isSchemaAdapter()
function isSchemaAdapter(value: unknown): value is SchemaAdapter<Record<string, unknown>>;Defined in: adapters/schema-adapter.ts:13
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
value is SchemaAdapter<Record<string, unknown>>
isSubmitTransportAdapter()
function isSubmitTransportAdapter(value: unknown): value is SubmitTransportAdapter<Record<string, unknown>, unknown>;Defined in: adapters/submit-transport-adapter.ts:15
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
value is SubmitTransportAdapter<Record<string, unknown>, unknown>
createForm()
function createForm<TValues>(config: FormConfig<TValues>): FormInstance<TValues>;Defined in: core/create-form.ts:1330
Create a form workflow instance. Pass target + schema to enhance native HTML, or initialValues for headless usage.
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
config | FormConfig<TValues> |
Returns
FormInstance<TValues>
pluginAsModule()
function pluginAsModule<TValues>(
plugin: FormPlugin<TValues>,
order: number,
api?: FormPluginApi<TValues>): FormModule<TValues>;Defined in: core/form-module-host.ts:11
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
plugin | FormPlugin<TValues> |
order | number |
api? | FormPluginApi<TValues> |
Returns
FormModule<TValues>
when()
function when<TValues>(field: string): WhenRuleBuilder<TValues>;Defined in: engines/workflow/when.ts:138
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
field | string |
Returns
WhenRuleBuilder<TValues>
matchesField()
function matchesField<TValues>(targetPath: string, message: string): Validator<TValues>;Defined in: validation/cross-field.ts:17
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Parameters
| Parameter | Type | Default value |
|---|---|---|
targetPath | string | undefined |
message | string | "Values must match." |
Returns
Validator<TValues>
requiredWhen()
function requiredWhen<TValues>(
sourcePath: string,
predicate: (value: unknown, context: ValidationContext<TValues>) => boolean,
message: string): Validator<TValues>;Defined in: validation/cross-field.ts:27
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Parameters
| Parameter | Type | Default value |
|---|---|---|
sourcePath | string | undefined |
predicate | (value: unknown, context: ValidationContext<TValues>) => boolean | undefined |
message | string | "This field is required." |
Returns
Validator<TValues>
runValidationPipeline()
function runValidationPipeline<TValues>(input: ValidationPipelineInput<TValues>): Promise<Record<string, string>>;Defined in: validation/pipeline.ts:22
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
input | ValidationPipelineInput<TValues> |
Returns
Promise<Record<string, string>>
currency()
function currency(options: CurrencyValidatorOptions): Validator;Defined in: validation/validators/currency.ts:9
Parameters
| Parameter | Type |
|---|---|
options | CurrencyValidatorOptions |
Returns
custom()
function custom<TValues>(fn: CustomFieldValidator<TValues>): Validator<TValues>;Defined in: validation/validators/custom.ts:9
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
fn | CustomFieldValidator<TValues> |
Returns
Validator<TValues>
asyncValidator()
function asyncValidator<TValues>(fn: Validator<TValues>): AsyncValidator<TValues>;Defined in: validation/validators/custom.ts:18
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
fn | Validator<TValues> |
Returns
AsyncValidator<TValues>
date()
function date(options: DateValidatorOptions): Validator;Defined in: validation/validators/date.ts:29
Parameters
| Parameter | Type |
|---|---|
options | DateValidatorOptions |
Returns
maxLength()
function maxLength(max: number): Validator;Defined in: validation/validators/max-length.ts:4
Parameters
| Parameter | Type |
|---|---|
max | number |
Returns
minLength()
function minLength(min: number): Validator;Defined in: validation/validators/min-length.ts:4
Parameters
| Parameter | Type |
|---|---|
min | number |
Returns
number()
function number(options: NumberValidatorOptions): Validator;Defined in: validation/validators/number.ts:22
Parameters
| Parameter | Type |
|---|---|
options | NumberValidatorOptions |
Returns
min()
function min(minimum: number): Validator;Defined in: validation/validators/number.ts:50
Parameters
| Parameter | Type |
|---|---|
minimum | number |
Returns
max()
function max(maximum: number): Validator;Defined in: validation/validators/number.ts:69
Parameters
| Parameter | Type |
|---|---|
maximum | number |
Returns
password()
function password(options: PasswordValidatorOptions): Validator;Defined in: validation/validators/password.ts:11
Parameters
| Parameter | Type |
|---|---|
options | PasswordValidatorOptions |
Returns
phone()
function phone(message: string): Validator;Defined in: validation/validators/phone.ts:5
Parameters
| Parameter | Type | Default value |
|---|---|---|
message | string | "Enter a valid phone number." |
Returns
regex()
function regex(pattern: RegExp, message: string): Validator;Defined in: validation/validators/regex.ts:4
Parameters
| Parameter | Type | Default value |
|---|---|---|
pattern | RegExp | undefined |
message | string | "Invalid format." |
