Skip to content

hidden

Non-rendering field carrying a value through the form.

Builder F.hidden(attribute: string): HiddenField
Wire type key hidden
Class chain HiddenFieldField
Detail projection text-entry
Column counterpart (not tabulatable)

Example

import { F } from '@adonia/core'

F.hidden('authorId').valueType('number').default(42)

Props

Beyond the shared field DSL:

Prop Declared on Behaviour
valueType(type: HiddenValueType): this HiddenField Declares the underlying scalar type (§11.1). Defaults to string, matching what an <input type="hidden"> submits; declare number or boolean when the attribute is one, so the validator coerces and the fill writes the right primitive instead of a numeric string.

Validation

Vine base: vine.number(), vine.boolean(), vine.string().

§11.1 mapping: the declared underlying type, vine.string() by default.

Contributed by HiddenField.vineSchema() in packages/core/src/schema/fields/hidden.ts. The shared modifiers (required, nullable, requiredWhen, unique, optionality) are applied on top by Field.buildValidation, and a rules() override replaces the base entirely — the validator compiler never branches on the field class.

Declared in

  • packages/core/src/schema/fields/hidden.tsHiddenField
Navigation

Type to search…

↑↓ navigate↵ selectEsc close