Skip to main content

Class: ValidationError

yup.ValidationError

Hierarchy​

  • Error

    ↳ ValidationError

Constructors​

constructor​

• new ValidationError(errorOrErrors, value?, field?, type?)

Parameters​

NameType
errorOrErrorsstring | ValidationError | ValidationError[]
value?any
field?string
type?string

Overrides​

Error.constructor

Properties​

errors​

• errors: string[]


inner​

• inner: ValidationError[]


message​

• message: string

Inherited from​

Error.message


name​

• name: string

Inherited from​

Error.name


params​

• Optional params: Params


path​

• Optional path: string


stack​

• Optional stack: string

Inherited from​

Error.stack


type​

• Optional type: string


value​

• value: any


stackTraceLimit​

â–ª Static stackTraceLimit: number

Inherited from​

Error.stackTraceLimit

Methods​

captureStackTrace​

â–¸ Static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters​

NameType
targetObjectObject
constructorOpt?Function

Returns​

void

Inherited from​

Error.captureStackTrace


formatError​

â–¸ Static formatError(message, params): any

Parameters​

NameType
messageunknown
paramsParams

Returns​

any


isError​

â–¸ Static isError(err): err is ValidationError

Parameters​

NameType
errany

Returns​

err is ValidationError


prepareStackTrace​

â–¸ Static Optional prepareStackTrace(err, stackTraces): any

Optional override for formatting stack traces

see https://github.com/v8/v8/wiki/Stack%20Trace%20API#customizing-stack-traces

Parameters​

NameType
errError
stackTracesCallSite[]

Returns​

any

Inherited from​

Error.prepareStackTrace