Table of Contents

Class CharFormatDataString

Namespace
SunamoString._public.SunamoData.Data
Assembly
SunamoString.dll

Defines formatting rules for character validation including case, required characters, and length constraints.

public class CharFormatDataString
Inheritance
CharFormatDataString
Inherited Members
Extension Methods

Constructors

CharFormatDataString()

Initializes a new empty instance with default values.

public CharFormatDataString()

CharFormatDataString(bool?, char[])

Initializes a new instance with the specified case constraint and required characters.

public CharFormatDataString(bool? isUpper, char[] mustBe)

Parameters

isUpper bool?

Whether characters should be uppercase. Null means no constraint.

mustBe char[]

Array of characters that must be present.

Properties

FromTo

Range specification for character count (min/max length).

public FromToString? FromTo { get; set; }

Property Value

FromToString

MustBe

Array of characters that must be present.

public char[]? MustBe { get; set; }

Property Value

char[]

Upper

Indicates if characters should be uppercase. Null means no constraint.

public bool? Upper { get; set; }

Property Value

bool?

Methods

Get(bool?, FromToString, params char[])

Creates a CharFormatDataString with the specified constraints.

public static CharFormatDataString Get(bool? isUpper, FromToString fromTo, params char[] mustBe)

Parameters

isUpper bool?

Whether characters should be uppercase. Null means no constraint.

fromTo FromToString

The required length range.

mustBe char[]

Characters that must be present.

Returns

CharFormatDataString

GetOnlyNumbers(FromToString)

Creates a CharFormatDataString that only allows numeric characters within the specified length range.

public static CharFormatDataString GetOnlyNumbers(FromToString requiredLength)

Parameters

requiredLength FromToString

The required length range.

Returns

CharFormatDataString