@metreeca/blue - v0.9.1
    Preparing search index...

    Interface StringConstraints

    Constraints for the string shape factory.

    Extends TextualConstraints with the prototype model value.

    interface StringConstraints {
        model?: string;
        minLength?: number;
        maxLength?: number;
        pattern?: string | RegExp;
        in?: readonly string[];
        hasValue?: readonly string[];
    }

    Hierarchy (View Summary)

    Index

    Properties

    model?: string

    Prototype value for runtime model assembly.

    "" (empty string)

    minLength?: number

    Minimum string length in characters.

    undefined (no minimum length)

    maxLength?: number

    Maximum string length in characters.

    undefined (no maximum length)

    pattern?: string | RegExp

    Regular expression pattern that values must match.

    The pattern is tested against the entire value. Use anchors (^ and $) to match the complete string rather than partial matches.

    undefined (no pattern constraint)

    in?: readonly string[]

    Allowed values (closed enumeration).

    When specified, values must be members of this list.

    undefined (no enumeration constraint)

    hasValue?: readonly string[]

    Required values that must be present.

    When specified, all listed values must appear in the resource.

    undefined (no required values)