IMaskEdit.ValidChars

Syntax

ValidChars: String;

Description

The ValidChars property determines a set of characters that the user can enter in the input field.

Comments

Available characters are entered as a continuous string, for example, 0123ABCD.

Example

Executing the example requires a form, a button with the Button1 name located on it and the MaskEdit component with the MaskEdit1 name.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
    MaskEdit1.MaskEnabled := True;
    MaskEdit1.Mask := "           dd dd ddddd";
    MaskEdit1.InputTemplate := "Phone:8-9__-__-_____";
    MaskEdit1.ValidChars := "012345";
End Sub Button1OnClick;

The pattern to enter the cell phone number is set for the MaskEdit1 component by clicking the button after an example execution. The digits in the 0-5 range are available for the number input.

See also:

IMaskEdit