Class Validation

Class representing form validation.

Constructors

Methods

  • Binds the form to value changes for validation.

    Parameters

    • input: string | HTMLElement

      The input element or its ID.

    Returns void

  • Validates the entire form.

    Type Parameters

    • T = void

    Returns { isValid: boolean; values: T }

    True if the form is valid, false otherwise.

  • Validates a specific input element.

    Parameters

    • input: string | HTMLElement

      The input element or its ID.

    Returns { isValid: boolean; value?: string }

    True if the input is valid, false otherwise.