Interface
ITokenValidationRule

Represents the validation rule for a token in the mask.

Definition

Namespace:Telerik.Windows.Controls.MaskedInput.Tokens

Assembly:Telerik.Windows.Controls.Input.dll

Syntax:

cs-api-definition
public interface ITokenValidationRule

Properties

IsRequired

Gets whether the token is required or not.

Declaration

cs-api-definition
bool IsRequired { get; }

Property Value

bool

Remarks

If the token is required, then if the position of that token is empty, the validation will fail. If the token is not required, then this position can be left empty.

Token

The char of the Token.

Declaration

cs-api-definition
char Token { get; }

Property Value

char

Type

The type of the Token.

Declaration

cs-api-definition
TokenTypes Type { get; }

Property Value

TokenTypes

ValidChars

Available values for the token.

Declaration

cs-api-definition
string ValidChars { get; }

Property Value

string

Remarks

This is used when spinning the value validated against that token.

Methods

IsValid(char)

Checks whether a given char is valid against this token rule.

Declaration

cs-api-definition
bool IsValid(char character)

Parameters

character

char

The token to check.

Returns

bool

Returns true if the char is valid.