Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "core/forms-validation"

Index

Type aliases

TestFunction

TestFunction: function

Type declaration

    • (value?: any): Promise<boolean> | boolean
    • Parameters

      • Optional value: any

      Returns Promise<boolean> | boolean

Validator

Validator: function

Type declaration

    • (value: any): Promise<undefined | string> | undefined | string
    • Parameters

      • value: any

      Returns Promise<undefined | string> | undefined | string

Functions

_errorMessage

  • _errorMessage(value: any, errorMessage?: string): string

allRules

  • Accepts a given value only if it satisfies the specified test. Note: if the field is not set, the test function might fail and trigger an error (= required field).

    Parameters

    • testFunctions: TestFunction[]
    • Optional errorMessage: string

    Returns Validator

anyRule

  • Accepts a given value only if it satisfies the specified test. Note: if the field is not set, the test function might fail and trigger an error (= required field).

    Parameters

    • testFunctions: TestFunction[]
    • Optional errorMessage: string

    Returns Validator

rule

  • Accepts a given value only if it satisfies the specified test. Note: if the field is not set, the test function might fail and trigger an error (= required field).

    Parameters

    Returns Validator

validateObject

  • validateObject(object: object, validators: object): Promise<undefined | string>

Generated using TypeDoc