Options
All
  • Public
  • Public/Protected
  • All
Menu

Custom sanitizer schema

Hierarchy

Index

Constructors

  • new CustomObjectSchema(test: (object: any) => boolean, sanitize: (object: any) => any): CustomObjectSchema

Properties

schema: CustomSanitizeRawSchema

Methods

  • provideTestError(object: any): Error
  • sanitize(object: any): any
  • test(object: any): boolean
  • Tests the schema against an object

    Parameters

    • object: any

      The object to test

    Returns boolean

    true if it matches the schema, false if it does not match

  • Sets custom sanitizer

    Parameters

    • sanitize: (object: any) => any

      Schema sanitizer

        • (object: any): any
        • Parameters

          • object: any

          Returns any

    Returns CustomObjectSchema

    self

  • Sets custom tester

    Parameters

    • test: (object: any) => boolean

      Schema tester

        • (object: any): boolean
        • Parameters

          • object: any

          Returns boolean

    Returns CustomObjectSchema

    self

Generated using TypeDoc