sketches
    Preparing search index...

    Class StringValidator

    Static properties and methods for validating string types.

    Index

    Accessors

    • get HEX_COLOR_PATTERN(): RegExp

      Regular expression pattern for validating hex color strings in the formats #RRGGBB and #RRGGBBAA. Case must be consistent in hex color strings: either all lowercase or all uppercase.

      Returns RegExp

    • get HEX_COLOR_PATTERN_RGB(): RegExp

      Regular expression pattern for validating hex color strings in the format #RRGGBB. Case must be consistent in hex color strings: either all lowercase or all uppercase.

      Returns RegExp

    • get HEX_COLOR_PATTERN_RGBA(): RegExp

      Regular expression pattern for validating hex color strings in the format #RRGGBBAA. Case must be consistent in hex color strings: either all lowercase or all uppercase.

      Returns RegExp

    • get SINGLE_LINE_LOWERCASE_TRIMMED(): RegExp

      Regular expression pattern for validating single-line lowercase strings. This expression does allow multiple spaces within the string, but does not allow tab breaks, new lines, leading whitespace, or trailing whitespace.

      Returns RegExp

    Methods

    • Is the given input a non-empty string? Non-empty strings must contain at least one non-whitespace character.

      Parameters

      • input: unknown

        The input to be tested.

      Returns boolean

      true if the given input is a non-empty string, false otherwise.