The TextEdit component renders a single-line text input for Dataverse string columns.
<TextEdit columnName="ppp_name" /><TextEdit ColumnName="ppp_name" />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.
<TextEdit columnName="emailaddress1" type="email" />
<TextEdit columnName="telephone1" type="tel" /><TextEdit ColumnName="emailaddress1" TextFieldType="TextFieldType.Email" />
<TextEdit ColumnName="telephone1" TextFieldType="TextFieldType.Tel" />Use MinLength and MaxLength to enforce text length constraints. MaxLength is automatically populated from the column metadata if not explicitly set.
<TextEdit columnName="ppp_name" minLength={3} maxLength={100} /><TextEdit ColumnName="ppp_name" MinLength="3" MaxLength="100" />Set Mask to constrain and format the value as the user types. MaskMode.Pattern applies a slotted template supplied via Pattern — 0 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.
<!-- Pattern mask: phone number -->
<TextEdit ColumnName="telephone1"
Mask="MaskMode.Pattern"
Pattern="(000) 000-0000" />
<!-- Regex filter: letters and spaces only -->
<TextEdit ColumnName="ppp_name"
Mask="MaskMode.Regex"
AllowedPattern="[A-Za-z ]" />
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.
<!-- Stores "(555) 123-4567" instead of "5551234567" -->
<TextEdit ColumnName="telephone1"
Mask="MaskMode.Pattern"
Pattern="(000) 000-0000"
StoreMaskedValue="true" />
A basic TextEdit bound to a string column.
Use the controls below to explore the available properties.
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.
Stored value:
—
Name | Type | Default | Description |
|---|---|---|---|
AllowedPattern | string? | Per-character allow regex for MaskMode.Regex (e.g. | |
Autocomplete | bool | False | Enables browser autocomplete for the text edit. |
ChildContent | RenderFragment? | Child content of the component | |
ColumnName* | string | Column logical name to bind the editor to from the table record. | |
Description | string? | Description to be displayed in the tooltip. | |
Disabled | bool? | Should the editor be disabled. | |
DisplayLabelWhenAvailable | bool | True | Specifies whether to display a lable if available. |
DisplayTooltipWhenAvailable | bool | True | Specifies whether to display a tooltip if available. |
DisplayValidationErrorMessage | bool | True | Should a validation error message be displayed when the component fails validation? |
EndContent | RenderFragment? | Content rendered in the field's | |
Immediate | bool | False | When true, the editor commits its value on every keystroke (the DOM false so existing consumers keep their blur-commit behavior. Forwarded to MaskedTextField.Immediate; see that property for the masked-vs-fast-path nuance. |
ImmediateDelay | int | 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 MaskedTextField.ImmediateDelay. |
IsVisible | bool | True | Is the editor visible. |
Label | string? | Text to be displayed as a label for the editor. | |
Mask | MaskMode | 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. |
MaxLength | int? | Max length of the allowable string. | |
MinLength | int? | Max length of the allowable string. | |
Pattern | string? | Slotted template for MaskMode.Pattern (e.g. | |
ReadOnly | bool? | Should the editor be read-only. | |
Required | bool? | Should the value be required. | |
Rows | int? | When specified, determines the number of rows that the control will occupy. | |
StartContent | RenderFragment? | Content rendered in the field's | |
StoreMaskedValue | bool | 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. false (the default), it stores the unmasked value (e.g. TextEdit.Mask is MaskMode.None. |
TextFieldType | TextFieldType | Text | Type of field for the text edit |
Value | string? | Value of the control. |
AllowedPatternMaskMode.Regex (e.g. AutocompleteChildContentColumnName*DescriptionDisabledDisplayLabelWhenAvailableDisplayTooltipWhenAvailableDisplayValidationErrorMessageEndContentImmediatetrue, the editor commits its value on every keystroke (the DOM false so existing consumers keep their blur-commit behavior. Forwarded to MaskedTextField.Immediate; see that property for the masked-vs-fast-path nuance.ImmediateDelayTextEdit.Immediate is true. Zero (the default) commits on every keystroke; positive values wait that long after the last keystroke before firing MaskedTextField.ImmediateDelay.IsVisibleLabelMaskMaskMode.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.MaxLengthMinLengthPatternMaskMode.Pattern (e.g. ReadOnlyRequiredRowsStartContentStoreMaskedValuetrue, the column stores the masked text including literals/separators (e.g. false (the default), it stores the unmasked value (e.g. TextEdit.Mask is MaskMode.None.TextFieldTypeValueName | Type | Description |
|---|---|---|
ValueChanged | EventCallback<ColumnValueBase> | Gets or sets a callback that updates the bound value. |
ValueChangedName | Parameters | Type | Description |
|---|---|---|---|
GetValidationErrors | List<string> | Returns a collection of the current validation errors. |
GetValidationErrors