New to Telerik UI for WPFStart a free 30-day trial

Represents the character token validation rule.

Definition

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

Assembly:Telerik.Windows.Controls.Input.dll

Syntax:

C#
public class LetterRequiredTokenValidationRule : ITokenValidationRule

Inheritance: objectLetterRequiredTokenValidationRule

Implements: ITokenValidationRule

Constructors

C#
public LetterRequiredTokenValidationRule()

Properties

Gets whether the token is required or not.

C#
public bool IsRequired { get; }

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.

The char of the Token.

C#
public char Token { get; }

Implements: ITokenValidationRule.Token

The type of the Token.

C#
public TokenTypes Type { get; }

Implements: ITokenValidationRule.Type

Available values for the token.

C#
public string ValidChars { get; }

Implements: ITokenValidationRule.ValidChars

Remarks:

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

Methods

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

C#
public bool IsValid(char character)
Parameters:characterchar

The token to check.

Returns:

bool

Returns true if the char is valid.

Implements: ITokenValidationRule.IsValid(char)