Class
CharacterTokenValidationRule

Represents the character token validation rule.

Definition

Namespace:Telerik.Windows.Controls.MaskedInput.Tokens.Numeric

Assembly:Telerik.Windows.Controls.Input.dll

Syntax:

cs-api-definition
public class CharacterTokenValidationRule : ITokenValidationRule

Inheritance: objectCharacterTokenValidationRule

Implements: ITokenValidationRule

Constructors

CharacterTokenValidationRule()

Declaration

cs-api-definition
public CharacterTokenValidationRule()

Properties

IsRequired

Gets whether the token is required or not.

Declaration

cs-api-definition
public bool IsRequired { get; }

Property Value

bool

Implements ITokenValidationRule.IsRequired

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
public char Token { get; }

Property Value

char

Implements ITokenValidationRule.Token

Type

The type of the Token.

Declaration

cs-api-definition
public TokenTypes Type { get; }

Property Value

TokenTypes

Implements ITokenValidationRule.Type

ValidChars

Available values for the token.

Declaration

cs-api-definition
public string ValidChars { get; }

Property Value

string

Implements ITokenValidationRule.ValidChars

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
public bool IsValid(char character)

Parameters

character

char

The token to check.

Returns

bool

Returns true if the char is valid.

Implements ITokenValidationRule.IsValid(char)