Class Valve

Index

Constructor methods

Methods

Constructor methods

constructor(schema: IValveSchema, baton?: any): Valve

Parameters

Returns

Valve

Methods

public addChainValidator(name: string, description: string, func: (value: any, callback: (err: Error, cleaned: any) => void) => void)

Parameters

  • name: string
  • description: string
  • func: (value: any, callback: (err: Error, cleaned: any) => void) => void

public addFinalValidator(func: (obj: any, callback: (err: Error, cleaned: any) => void) => void): Valve

Parameters

  • func: (obj: any, callback: (err: Error, cleaned: any) => void) => void

Returns

Valve

public check(obj: any, options: ICheckOptions, callback: (err: any, cleaned: any) => void)

Parameters

  • obj: any
  • options: ICheckOptions
  • callback: (err: any, cleaned: any) => void

public check(obj: any, callback: (err: any, cleaned: any) => void)

Parameters

  • obj: any
  • callback: (err: any, cleaned: any) => void

public checkUpdate(existing: any, obj: any, callback: (err: any, cleaned: any) => void)

Parameters

  • existing: any
  • obj: any
  • callback: (err: any, cleaned: any) => void

public help(schema: IValveSchema): any

Parameters

Returns

any

public setSchema(schema: IValveSchema): Valve

Parameters

Returns

Valve