Interface: ValidationError
Extends
Error
Properties
| Property | Type | Description | Overrides | Inherited from |
|---|---|---|---|---|
_original | any | - | - | - |
cause? | unknown | - | - | Error.cause |
details | ValidationErrorItem[] | array of errors. | - | - |
isJoi | boolean | - | - | - |
message | string | - | - | Error.message |
name | "ValidationError" | - | Error.name | - |
stack? | string | - | - | Error.stack |
Methods
annotate()
ts
annotate(stripColors?: boolean): string;function that returns a string with an annotated version of the object pointing at the places where errors occurred.
NOTE: This method does not exist in browser builds of Joi
Parameters
| Parameter | Type | Description |
|---|---|---|
stripColors? | boolean | if truthy, will strip the colors out of the output. |
Returns
string