Interface CharacterSetValidation

Character set validation parameters.

interface CharacterSetValidation {
    minimumLength?: number;
    maximumLength?: number;
    exclusion?: Exclusion;
    positionOffset?: number;
    component?: string | (() => string);
}

Hierarchy (view full)

Properties

minimumLength?: number

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

maximumLength?: number

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

exclusion?: Exclusion

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

positionOffset?: number

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

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

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