Number Input

A specialized input field component designed for numeric data entry. It supports decimal precision control, numeric validation, range constraints, and localized number formatting. Automatically filters non-numeric characters and provides proper number formatting based on specified decimal places. Ideal for forms requiring numerical input such as quantities, measurements, or financial values.


Extends: fieldComponent


Fields

Name

Code

Data Type

Description

Decimal Places

digits

number

Specifies the number of decimal places to display and store in the numeric value

Numeric Range

range

text

Defines the acceptable numeric range for input validation

Minimum Value

minimumValue

text

Sets the lowest allowed numeric value

Maximum Value

maximumValue

text

Sets the highest allowed numeric value

Custom Validation Script

customValidationScript

text

A custom JavaScript function for additional numeric validation rules

Custom Validation Message

customValidationMessage

multi-locale

The error message shown when custom numeric validation fails (Multi-lingual)

Unique

unique

boolean

Ensures the entered numeric value doesn't duplicate existing values in the system


Methods

Name

Description

fromValue

Converts input value to a localized, formatted numeric string with specified decimal places

toValue

Removes non-numeric characters and prepares the value for storage

getType

Returns the input type as 'number'

setDefaultProp

Sets default properties for the number input, specifically decimal places


Events

Name

Description

onChange

Triggered when the numeric value is modified

onBlur

Triggered when the number input loses focus

onFocus

Triggered when the number input gains focus