Text Area

A multi-line text input component designed for entering and editing longer text content. It supports extensive validation options including length restrictions and pattern matching, custom validation rules, and can handle large text inputs efficiently. Perfect for forms requiring paragraph entries, comments, or any multi-line text content with validation.


Extends: fieldComponent


Fields

Name

Code

Data Type

Description

Label

label

multi-locale

The visible text label that appears above the text area to identify its purpose (Multi-lingual)

Resource ID

resourceId

text

A unique identifier for the field, used to reference this specific text area component in the system

Style Classes

styleClasses

text

CSS class names to apply custom styling to the text area and its container

Width Class

widthClass

text

Controls how wide the text area appears on different screen sizes using predefined width classes

Value

value

text

The current text content entered in the text area

Visibility

isVisible

boolean

Controls whether the text area is shown or hidden on the screen

Enabled

enabled

boolean

Determines if users can interact with the text area (true) or if it's disabled (false)

Outlined

outlined

boolean

When true, displays the text area with an outlined visual style

Field Style

fieldStyle

text

Custom inline CSS styles to apply directly to the text area

Validation

validation

text

Rules that determine what input is considered valid (length, pattern, unique, custom, required)

Minimum Length

minLength

number

The minimum number of characters users must enter for the text area to be valid

Maximum Length

maxLength

number

The maximum number of characters users are allowed to enter in the text area

Minimum Value

minimumValue

text

The lowest acceptable value when using range validation for text content

Maximum Value

maximumValue

text

The highest acceptable value when using range validation for text content

Validation Pattern

validationPattern

text

A regular expression pattern that the text area content must match to be considered valid

Pattern Validation Message

patternValidationMessage

multi-locale

The error message shown when the text content doesn't match the validation pattern (Multi-lingual)

Custom Validation Script

customValidationScript

text

A custom JavaScript function that performs additional validation checks beyond standard rules

Custom Validation Message

customValidationMessage

multi-locale

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

Unique

unique

boolean

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


Methods

Name

Description

fromValue

Converts input value, decoding HTML entities for display

toValue

Converts input value, encoding HTML special characters for safe storage

getType

Returns the input type as 'textarea'


Events

Name

Description

onChange

Triggered each time the user modifies the text content in the text area

onBlur

Triggered when the text area loses focus

onFocus

Triggered when the text area gains focus