Skip to content

AIDC Toolkit / Utility / CharacterSetValidation

Interface: CharacterSetValidation ​

Defined in: character-set.ts:11

Character set validation parameters.

Extends ​

Properties ​

minimumLength? ​

optional minimumLength?: number

Defined in: character-set.ts:15

Minimum length. If defined and the string is less than this length, an error is thrown.


maximumLength? ​

optional maximumLength?: number

Defined in: character-set.ts:20

Maximum length. If defined and the string is greater than this length, an error is thrown.


exclusion? ​

optional exclusion?: Exclusion

Defined in: character-set.ts:25

Exclusion from the string. If defined and the string is within the exclusion range, an error is thrown.


positionOffset? ​

optional positionOffset?: number

Defined in: character-set.ts:31

Position offset within a larger string. Strings are sometimes composed of multiple substrings; this parameter ensures that the error notes the proper position in the string.


component? ​

optional component?: string | (() => string)

Defined in: character-set.ts:38

Name of component, typically but not exclusively within a larger string. This parameter ensure that the error notes the component that triggered it. Value may be a string or a callback that returns a string, the latter allowing for localization changes.