Numeric input bound to a number attribute.
| Builder | F.number(attribute: string): NumberField |
| Wire type key | number |
| Class chain | NumberField → NumericField → Field |
| Detail projection | text-entry |
| Column counterpart | number cell, i.e. C.number(attribute) |
Example
import { F } from '@adonia/core'
F.number('price').label('Price').min(0).max(9999).decimal(2).suffix('EUR')Props
Beyond the shared field DSL:
| Prop | Declared on | Behaviour |
|---|---|---|
min(value: number): this |
NumericField |
Lower bound; compiles to Vine min (§11.1) and rides the wire for the input. |
max(value: number): this |
NumericField |
Upper bound; compiles to Vine max (§11.1). |
step(value: number): this |
NumericField |
Input granularity. A rendering affordance only — see the module note. |
decimal(places: number): this |
NumericField |
Maximum decimal places (§11.1 decimal(places)). decimal(0) is the integer constraint; omitting it accepts any precision. |
Validation
Vine base: vine.number().
§11.1 mapping: vine.number() + min/max/decimal.
Contributed by NumericField.vineSchema() in packages/core/src/schema/fields/numeric.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/number.ts—NumberFieldpackages/core/src/schema/fields/numeric.ts—NumericField