velocity-ui
    Preparing search index...

    Class Validator

    Index

    Constructors

    Methods

    • Add validation rules for a field

      Parameters

      • fieldName: string

        The name of the field to validate

      • validators: ValidatorConfig[] = []

        Array of validation configurations

      Returns Validator

      The validator instance for chaining

    • Get validation errors

      Returns ValidationErrors

      Key-value map of validation errors

    • Check if validator has errors

      Returns boolean

      True if there are validation errors, false otherwise

    • Reset validation state

      Returns void

    • Validate multiple fields

      Parameters

      • data: ValidationData = {}

        Key-value map of fields and values

      Returns boolean

      True if all validations pass, false otherwise

    • Validate a single field

      Parameters

      • fieldName: string

        The name of the field to validate

      • value: any

        The value to validate

      Returns boolean

      True if validation passes, false otherwise