Interface CharacterSetValidation

Character set validation parameters.

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

Hierarchy (View Summary)

Properties

minimumLength?: number

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

maximumLength?: number

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

exclusion?: Exclusion

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

positionOffset?: number

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?: string | () => string

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.