MaskedTextBox
The Wisej.NET MaskedTextBox enhances the TextBox control with declarative input validation. The Mask property enables specifying:
- Required input characters
- Optional input characters
- Input type expected at each mask position (digit, alphabetic, alphanumeric)
- Mask literals (characters appearing directly in the
MaskedTextBox, like hyphens in phone numbers or currency symbols) - Special character processing (e.g., converting to uppercase)
Features
Preset Masks
The custom mask property editor provides selection from predefined, commonly used masks.
-e8e963c73a8b3d069aed82e56173b739.png)
Custom Error Handling
The InvalidMessage property sets a tooltip message for invalid entries.
The TypeValidationCompleted event handler enables custom validation behavior.
-bcf43ff8830c367a90b6ccbc45484be0.gif)
Text Mask Format
The TextMaskFormat property determines literal and prompt character processing in the formatted string, controlling their inclusion in the Text property. Excluded prompt characters convert to spaces.
ExcludePromptAndLiterals: Shows only user input textIncludeLiterals: Shows user input and mask literal charactersIncludePrompt: Shows user input and prompt charactersIncludePromptAndLiterals: Shows user input, literal characters, and prompt characters
How To
Customize the Appearance
Customize text color using the ForeColor property.
Advanced
JavaScript Widget
| Item | Description |
|---|---|
| Class name | "wisej.web.MaskedTextBox" |
| Theme Appearance | "textbox" |
| Child components | "textfield" is the inner <input> widget. See JavaScript |
| Toolcontainer state | "editor", see Embedded Tools |
| Source code | https://github.com/iceteagroup/wisej-js |