DxRegExMaskProperties Class
Defines properties for Regular Expression masks.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
public class DxRegExMaskProperties :
DxMaskPropertiesBase
Remarks
Use this class’s properties to set up the Masked Input component with a Regular Expression mask applied.
Customize Placeholders
The default placeholder character is an underscore (_
). To display a different character, change the Placeholder property value.
<DxMaskedInput @bind-Value="Value"
Mask="[A-Z]{3}-[0-9]{2}"
MaskMode="@MaskMode.RegEx">
<DxRegExMaskProperties Placeholder="Placeholder" />
</DxMaskedInput>
@code{
String Value { get; set; }
char Placeholder = '#';
}
To hide placeholders, set the PlaceholdersVisible to false
.
Autocomplete Modes
Use the MaskAutoCompleteMode property to enable automatic value completion.
<DxMaskedInput @bind-Value="Value"
Mask="\R{MonthNames}"
MaskMode="MaskMode.RegEx">
<DxRegExMaskProperties MaskAutoCompleteMode="MaskAutoCompleteMode.Optimistic" />
</DxMaskedInput>
@code{
string Value { get; set; }
}
If enabled, the editor suggests possible values to complete a partial value. The following autocomplete modes are supported:
Autocomplete mode | Description |
---|---|
Strong (default) | Each time a user types a character, the editor determines if the following placeholder can be filled. If only one character matches the mask, the editor displays this character and moves the caret forward. For example, if a user types the letter If a user adds |
Optimistic | When a user enters a character in the empty edit box for the first time, the editor fills all the placeholders with the default values. For example, if a user types the letter Another example is when the mask is set to |
None | The autocomplete feature is disabled. A user should type each character into the edit box. |