Text Input

A versatile text input field component that allows users to enter and edit single-line text content. It supports various input types (text, password, email), offers extensive validation options including length restrictions and pattern matching, can be styled using CSS classes, and includes multilingual support for labels and messages. The component's width can be customized, and it can be enabled or disabled, or made visible or invisible as needed. Perfect for forms requiring text data entry with validation.


Extends: fieldComponent


Fields

Name

Code

Data Type

Description

Label

label

multi-locale

The visible text label that appears above the input field (Multi-lingual)

Resource ID

resourceId

text

A unique identifier for the field

Style Classes

styleClasses

text

CSS class names to apply custom styling

Width Class

widthClass

text

Controls width using predefined width classes

Value

value

text

The current text content entered in the input field

Visibility

isVisible

boolean

Controls whether the field is visible

Enabled

enabled

boolean

Determines if the field is interactive

Field Style

fieldStyle

text

Custom inline CSS styles for the field

Field Type

fieldType

text

Type of text input (text, password, email, etc.)

Placeholder

placeholder

multi-locale

Example or hint text shown in the field (Multi-lingual)

Validation

validation

text

Rules for input validation (for example, length, pattern)

Minimum Length

minLength

number

Minimum number of characters required

Maximum Length

maxLength

number

Maximum number of characters allowed

Minimum Value

minimumValue

text

Minimum acceptable value for numeric input

Maximum Value

maximumValue

text

Maximum acceptable value for numeric input

Validation Pattern

validationPattern

text

Regex pattern the input must match

Pattern Validation Message

patternValidationMessage

multi-locale

Message shown when pattern validation fails (Multi-lingual)

Custom Validation Script

customValidationScript

text

Custom JS function for additional validation

Custom Validation Message

customValidationMessage

multi-locale

Message shown on custom validation failure (Multi-lingual)

Unique

unique

boolean

Ensures value uniqueness


Methods

Name

Description

fromValue

Converts input value, decoding HTML entities for display

toValue

Converts input value, encoding HTML characters for storage

getType

Determines input type based on configuration, with special handling for password visibility


Events

Name

Description

onChange

Triggered when the user modifies the input text

onBlur

Triggered when the input field loses focus

onFocus

Triggered when the input field gains focus