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 named Button1 on it and the MaskEdit component named MaskEdit1.

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;

After executing the example the template to enter the cell phone number is set for the MaskEdit1 component by clicking the button. The digits in the 0-5 range are available for the number input.

See also:

IMaskEdit