TextEdit

The TextEdit component renders a single-line text input for Dataverse string columns.

React
Blazor

Text Field Type

Set TextFieldType to change the input type. Options include Text (default), Email, Password, Tel, Url, Search, Number, and Color. The browser applies native formatting and validation for each type.

React
Blazor

Length Constraints

Use MinLength and MaxLength to enforce text length constraints. MaxLength is automatically populated from the column metadata if not explicitly set.

React
Blazor

Input Masks

Set Mask to constrain and format the value as the user types. MaskMode.Pattern applies a slotted template supplied via Pattern0 accepts a digit, A a letter, * an alphanumeric character, and every other character is a literal inserted automatically. MaskMode.Regex filters each character against the AllowedPattern regular expression, dropping anything that doesn't match. Masking runs in the browser and preserves the caret position as it reformats, so editing in the middle of the value behaves naturally. The default MaskMode.None leaves the field a plain text input with no interop overhead.

Storing With or Without the Mask

By default a masked field stores the unmasked value — for a phone pattern, 5551234567 rather than (555) 123-4567. Set StoreMaskedValue="true" to persist the formatted text (literals and all) into the column instead. Either way the field re-masks correctly on load, so the choice comes down to what the downstream system expects.

Example

A basic TextEdit bound to a string column.

React example
Blazor example
React TypeScript
Razor

Configuration Options

Use the controls below to explore the available properties.

React example
Blazor example
Readonly? Required? Disabled? ColorEmailNumberPasswordSearchTelTextUrl
React TypeScript
Razor

Mask Presets

Choose a mask from the dropdown and type into the field to see live, caret-safe masking. Each preset sets Mask together with a Pattern or AllowedPattern. Toggle Store masked value to compare what gets persisted to the column — the read-out below the field reflects the stored value live.

React example
Blazor example
None (plain text)Phone — (000) 000-0000SSN — 000-00-0000Credit card — 0000 0000 0000 0000ZIP+4 — 00000-0000Letters only — [A-Za-z ] Store masked value

Stored value:

React TypeScript
Razor
React Blazor

TextEdit Class

Parameters

Name
Type
Default
Description
AllowedPatternstring?
Per-character allow regex for MaskMode.Regex (e.g. [A-Za-z]).
Autocompletebool
False
Enables browser autocomplete for the text edit.
ChildContentRenderFragment?
Child content of the component
ColumnName*string
Column logical name to bind the editor to from the table record.
Descriptionstring?
Description to be displayed in the tooltip.
Disabledbool?
Should the editor be disabled.
DisplayLabelWhenAvailablebool
True
Specifies whether to display a lable if available.
DisplayTooltipWhenAvailablebool
True
Specifies whether to display a tooltip if available.
DisplayValidationErrorMessagebool
True
Should a validation error message be displayed when the component fails validation?
EndContentRenderFragment?
Content rendered in the field's end slot (after the input).
Immediatebool
False
When true, the editor commits its value on every keystroke (the DOM input event) instead of on blur (the DOM change event). Useful when multiple editors bound to the same column should stay in sync as the user types. Defaults to false so existing consumers keep their blur-commit behavior. Forwarded to MaskedTextField.Immediate; see that property for the masked-vs-fast-path nuance.
ImmediateDelayint
0
Debounce, in milliseconds, applied to the keystroke push when TextEdit.Immediate is true. Zero (the default) commits on every keystroke; positive values wait that long after the last keystroke before firing ValueChanged. Forwarded to MaskedTextField.ImmediateDelay.
IsVisiblebool
True
Is the editor visible.
Labelstring?
Text to be displayed as a label for the editor.
MaskMaskMode
None
Masking strategy applied to the input. Defaults to MaskMode.None, which keeps the field on the zero-interop fast path (a plain bound text field). Set to MaskMode.Pattern or MaskMode.Regex to enable caret-safe masking.
MaxLengthint?
Max length of the allowable string.
MinLengthint?
Max length of the allowable string.
Patternstring?
Slotted template for MaskMode.Pattern (e.g. (000) 000-0000).
ReadOnlybool?
Should the editor be read-only.
Requiredbool?
Should the value be required.
Rowsint?
When specified, determines the number of rows that the control will occupy.
StartContentRenderFragment?
Content rendered in the field's start slot (before the input) — an icon, prefix, etc.
StoreMaskedValuebool
False
Controls whether a masked value is stored with or without the mask. When true, the column stores the masked text including literals/separators (e.g. (555) 123-4567); when false (the default), it stores the unmasked value (e.g. 5551234567). Has no effect when TextEdit.Mask is MaskMode.None.
TextFieldTypeTextFieldType
Text
Type of field for the text edit
Valuestring?
Value of the control.
Name: AllowedPattern
Type: string?
Description: Per-character allow regex for MaskMode.Regex (e.g. [A-Za-z]).
Name: Autocomplete
Type: bool
Default: False
Description: Enables browser autocomplete for the text edit.
Name: ChildContent
Type: RenderFragment?
Description: Child content of the component
Name: ColumnName*
Type: string
Description: Column logical name to bind the editor to from the table record.
Name: Description
Type: string?
Description: Description to be displayed in the tooltip.
Name: Disabled
Type: bool?
Description: Should the editor be disabled.
Name: DisplayLabelWhenAvailable
Type: bool
Default: True
Description: Specifies whether to display a lable if available.
Name: DisplayTooltipWhenAvailable
Type: bool
Default: True
Description: Specifies whether to display a tooltip if available.
Name: DisplayValidationErrorMessage
Type: bool
Default: True
Description: Should a validation error message be displayed when the component fails validation?
Name: EndContent
Type: RenderFragment?
Description: Content rendered in the field's end slot (after the input).
Name: Immediate
Type: bool
Default: False
Description: When true, the editor commits its value on every keystroke (the DOM input event) instead of on blur (the DOM change event). Useful when multiple editors bound to the same column should stay in sync as the user types. Defaults to false so existing consumers keep their blur-commit behavior. Forwarded to MaskedTextField.Immediate; see that property for the masked-vs-fast-path nuance.
Name: ImmediateDelay
Type: int
Default: 0
Description: Debounce, in milliseconds, applied to the keystroke push when TextEdit.Immediate is true. Zero (the default) commits on every keystroke; positive values wait that long after the last keystroke before firing ValueChanged. Forwarded to MaskedTextField.ImmediateDelay.
Name: IsVisible
Type: bool
Default: True
Description: Is the editor visible.
Name: Label
Type: string?
Description: Text to be displayed as a label for the editor.
Name: Mask
Type: MaskMode
Default: None
Description: Masking strategy applied to the input. Defaults to MaskMode.None, which keeps the field on the zero-interop fast path (a plain bound text field). Set to MaskMode.Pattern or MaskMode.Regex to enable caret-safe masking.
Name: MaxLength
Type: int?
Description: Max length of the allowable string.
Name: MinLength
Type: int?
Description: Max length of the allowable string.
Name: Pattern
Type: string?
Description: Slotted template for MaskMode.Pattern (e.g. (000) 000-0000).
Name: ReadOnly
Type: bool?
Description: Should the editor be read-only.
Name: Required
Type: bool?
Description: Should the value be required.
Name: Rows
Type: int?
Description: When specified, determines the number of rows that the control will occupy.
Name: StartContent
Type: RenderFragment?
Description: Content rendered in the field's start slot (before the input) — an icon, prefix, etc.
Name: StoreMaskedValue
Type: bool
Default: False
Description: Controls whether a masked value is stored with or without the mask. When true, the column stores the masked text including literals/separators (e.g. (555) 123-4567); when false (the default), it stores the unmasked value (e.g. 5551234567). Has no effect when TextEdit.Mask is MaskMode.None.
Name: TextFieldType
Type: TextFieldType
Default: Text
Description: Type of field for the text edit
Name: Value
Type: string?
Description: Value of the control.

Events

Name
Type
Description
ValueChangedEventCallback<ColumnValueBase>
Gets or sets a callback that updates the bound value.
Name: ValueChanged
Type: EventCallback<ColumnValueBase>
Description: Gets or sets a callback that updates the bound value.

Methods

Name
Parameters
Type
Description
GetValidationErrorsList<string>
Returns a collection of the current validation errors.
Name: GetValidationErrors
Type: List<string>
Description: Returns a collection of the current validation errors.