Input validation result.

Combines messages sent by all registered validators.

Implements Iterable interface by iterating over all validation messages.

Hierarchy

Properties

Methods

Properties

ok: boolean

Whether validation succeed.

This is true when there is no validation messages, or false otherwise.

Methods

  • Checks whether there are errors with the given code.

    Parameters

    • Optional code: string

      Target code. Any message matches when absent.

    Returns boolean

    true if there is at least one message with the given code, or false otherwise.

  • Checks whether there are errors without the given codes.

    Parameters

    • Rest ...codes: string[]

      Excluded codes. Any message matches when empty.

    Returns boolean

    true is there is at least one message without any of the given codes, or false otherwise.

Generated using TypeDoc