ParseEnumPipeOptions


interface ParseEnumPipeOptions {
  optional?: boolean
  errorHttpStatusCode?: ErrorHttpStatusCode
  exceptionFactory?: (error: string) => any
}

Properties

Property Description
optional?: boolean

If true, the pipe will return null or undefined if the value is not provided

errorHttpStatusCode?: ErrorHttpStatusCode

The HTTP status code to be used in the response when the validation fails.

exceptionFactory?: (error: string) => any

A factory function that returns an exception object to be thrown if validation fails.