velocity-ui
    Preparing search index...

    Class ValidationUtils

    VelocityUI Validation Utilities Collection of reusable input validation functions

    Index

    Constructors

    Methods

    • Validate email format

      Parameters

      • value: unknown

        The email string to validate

      Returns boolean

      True if the email format is valid

    • Check if value is empty

      Parameters

      • value: unknown

        The value to check

      Returns boolean

      True if the value is empty

    • Validate equality (e.g., confirm password)

      Parameters

      • value: unknown

        The first value

      • compareTo: unknown

        The second value to compare against

      Returns boolean

      True if both values are equal

    • Validate value is within a given range

      Parameters

      • value: unknown

        The numeric value to validate

      • min: number = 0

        Minimum value (default: 0)

      • max: number = 100

        Maximum value (default: 100)

      Returns boolean

      True if the value is within the specified range

    • Validate if value is numeric

      Parameters

      • value: unknown

        The value to check

      Returns boolean

      True if the value is numeric

    • Validate required field

      Parameters

      • value: unknown

        The value to validate

      Returns boolean

      True if the value is not empty

    • Validate date string is valid

      Parameters

      • value: unknown

        The date string or Date object to validate

      Returns boolean

      True if the date is valid

    • Match value against regex pattern

      Parameters

      • value: unknown

        The string to test

      • pattern: RegExp

        The regex pattern to match against

      Returns boolean

      True if the value matches the pattern

    • Validate maximum string length

      Parameters

      • value: unknown

        The string to validate

      • max: number = Infinity

        Maximum length (default: Infinity)

      Returns boolean

      True if the string is within maximum length

    • Validate minimum string length

      Parameters

      • value: unknown

        The string to validate

      • min: number = 1

        Minimum length (default: 1)

      Returns boolean

      True if the string meets minimum length