interface Validator {
    validate: ((data) => Promise<any>);
}

Properties

Properties

validate: ((data) => Promise<any>)

Promise completes with one of the following:

  • null, when data was valid
  • something representing the error details, when data was invalid

Promise rejects with one of the following:

Type declaration

    • (data): Promise<any>
    • Parameters

      • data: string

      Returns Promise<any>