Table of Contents

Class CharValidator

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Default implementation of the ICharValidator interface.

public class CharValidator : AbstractCharValidator, IBaseObjectWithId, INotifyPropertyChanged, ICharValidator, ICustomCharValidator, IImmutableObject, IDisposableObject, IDisposable, IBaseObject
Inheritance
CharValidator
Implements

Fields

AllowNativeDigitsInNumbers

Gets or sets whether to allow native digits in the numeric validators.

AllowPlusInSignedNumbers

Gets or sets whether plus character is allowed in signed numeric validators.

AlwaysValidChars

Gets or sets array of characters that are always valid and allowed in the input. By default it equals [127] (Delete key is allowed).

AlwaysValidControlChars

Gets or set whether control characters (chars with codes 0..31) are always valid and allowed in the input. Default is True.

CultureInfoOverride

Gets or sets override which is used instead of CurrentCulture when char validators are created.

Properties

Culture

Gets used CultureInfo.

Default

Gets ICustomCharValidator instance which allows any input.

DigitsAndNegativeSignValidator

Gets or sets ICustomCharValidator instance which allows only digits and minus sign.

DigitsAndSignValidator

Gets or sets ICustomCharValidator instance which allows only digits, plus and minus sign.

DigitsValidator

Gets or sets ICustomCharValidator instance which allows only digits.

NativeDigits

Gets native digits from the Culture settings.

NegativeSign

Gets negative sign from the Culture settings.

NumberDecimalSeparator

Gets number decimal separator from the Culture settings.

NumberGroupSeparator

Gets number group separator from the Culture settings.

PositiveSign

Gets positive sign from the Culture settings.

SignedFloatValidator

Gets or sets ICustomCharValidator instance for the signed float validation.

UnsignedFloatValidator

Gets or sets ICustomCharValidator instance for the unsigned float validation.

UnsignedHexValidator

Gets or sets ICustomCharValidator instance which allows only hex digits.

Methods

AllCategoriesValid(bool)

Sets all possible character categories (UnicodeCategory) as valid or invalid for the input.

AllCharsValid(bool)

Sets all possible characters as valid or invalid for the input.

CreateValidator(Type?)

Creates ICustomCharValidator instance for the specified type. Only numeric types are supported. Returns Null if type is Null.

CreateValidator(TypeCode)

Creates ICustomCharValidator instance for the specified type code. Only numeric type codes are supported.

IsValidCategory(UnicodeCategory)

Checks whether the specified char category is valid for the input.

IsValidChar(char)

Checks whether the specified char is valid for the input. This method doesn't perform checks on char category, use IsValid(char) to check both char and it's category.

Reset()

Resets object to the initial state.

ValidCategory(UnicodeCategory, bool)

Sets the specified character category as valid or invalid for the input.

ValidChar(char, bool)

Sets the specified character as valid or invalid for the input.

Events

QueryCharValidatorForType

Occurs when CreateValidator(Type?) is called.