@nospamproxy/core
    Preparing search index...

    Text box that can be used as an../ValidatedControl/ValidatedControl

    // example.ts
    export class Example {
    private value = 7;
    }
    <!-- example.html -->
    <validated-control>
    <integer-text-box value.two-way="value" min.bind="0" max.bind="42"></integer-text-box>
    </validated-control>

    Implements

    • ICustomElementViewModel
    Index

    Constructors

    Properties

    autoFocus?: boolean
    disabled: boolean = false

    If true, the text box is disabled.

    labelledBy?: string

    An optional attribute to describe the input field for a screen reader. This is used if the input has a description.

    labelText?: string

    An optional attribute to describe the input field for a screen reader. This is used if the input has no description.

    max: number

    The maximum value.

    min: number

    The minimum value.

    required: boolean = true

    If false, empty inputs are allowed and bound to the value as "null".

    validationController?: ValidationController = undefined

    An optional validation controller to use for validation.

    validationMessageKey: string | null = null

    The translation key for a custom validation message.

    The following placeholders can be used: ${$config.min}, ${$config.max}

    <!-- example.html -->
    <integer-text-box validation-message-key="example.r.message" ...></integer-text-box>
    // example.r.json
    {
    "message": "Enter a value between ${$config.min} and ${$config.max}."
    }
    value: number | null | undefined

    The current value.

    valueText: string = ''

    Methods

    • Returns void

    • Returns void