Stone.js API
    Preparing search index...
    • Class decorator: validate incoming data against the schemas you already write, declaratively.

      @Validation() registers the validation service provider, so constructor ({ validator }) works anywhere and the @Validate() route decorators have something to resolve. There is no kernel middleware here: validation runs where it is asked for, not on every event.

      The declarative half of the pair; validationBlueprint handed to defineStoneApp is the imperative one.

      Type Parameters

      • T extends ClassType = ClassType

      Parameters

      Returns ClassDecorator

      A class decorator.

      import { Validation } from '@stone-js/validation'

      @Validation({ schemas: { listQuery: ListQuerySchema } })
      @StoneApp({ name: 'my-app' })
      export class Application {}