Skip to content

charton API


charton API / @chart-on/ui / index / NumberInputDef

Interface: NumberInputDef ​

Defined in: ui/src/form-model.ts:38

A number field (kind: 'number'), optionally bounded by min and max and limited to whole numbers.

Extends ​

Properties ​

default? ​

optional default?: number

Defined in: ui/src/form-model.ts:28

Value when the form opens without one, and after a reset.

Inherited from ​

FormInputBase.default


disabled? ​

optional disabled?: FormCondition

Defined in: ui/src/form-model.ts:32

Default false. Disabled inputs keep their value and are not validated.

Inherited from ​

FormInputBase.disabled


hint? ​

optional hint?: string

Defined in: ui/src/form-model.ts:26

Help text under the control.

Inherited from ​

FormInputBase.hint


id ​

id: string

Defined in: ui/src/form-model.ts:23

Key of this input's value in FormValues; unique within the schema.

Inherited from ​

FormInputBase.id


integer? ​

optional integer?: boolean

Defined in: ui/src/form-model.ts:44

Only whole numbers are valid.


kind ​

kind: "number"

Defined in: ui/src/form-model.ts:39


label ​

label: string

Defined in: ui/src/form-model.ts:24

Inherited from ​

FormInputBase.label


max? ​

optional max?: number

Defined in: ui/src/form-model.ts:41


min? ​

optional min?: number

Defined in: ui/src/form-model.ts:40


step? ​

optional step?: number

Defined in: ui/src/form-model.ts:42


visible? ​

optional visible?: FormCondition

Defined in: ui/src/form-model.ts:30

Default true. Hidden inputs keep their value and are not validated.

Inherited from ​

FormInputBase.visible

Methods ​

validate()? ​

optional validate(value, values): string | null | undefined

Defined in: ui/src/form-model.ts:34

A message when value is not acceptable, else nothing. Runs after the built-in checks pass.

Parameters ​

value ​

number

values ​

Readonly<FormValues>

Returns ​

string | null | undefined

Inherited from ​

FormInputBase.validate