Interface StringValidator<V>

String validator interface.

interface StringValidator<V extends StringValidation = StringValidation> {
    validate: (s: string, validation?: V) => void;
}

Type Parameters

Hierarchy (View Summary)

Implemented by

Properties

Properties

validate: (s: string, validation?: V) => void

Validate a string and throw an error if validation fails.

Type declaration

    • (s: string, validation?: V): void
    • Parameters

      • s: string

        String.

      • Optionalvalidation: V

        String validation parameters.

      Returns void