Class: ValidationError
yup.ValidationError
Hierarchy​
Error
↳
ValidationError
Constructors​
constructor​
• new ValidationError(errorOrErrors
, value?
, field?
, type?
)
Parameters​
Name | Type |
---|---|
errorOrErrors | string | 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​
Name | Type |
---|---|
targetObject | Object |
constructorOpt? | Function |
Returns​
void
Inherited from​
Error.captureStackTrace
formatError​
â–¸ Static
formatError(message
, params
): any
Parameters​
Name | Type |
---|---|
message | unknown |
params | Params |
Returns​
any
isError​
â–¸ Static
isError(err
): err is ValidationError
Parameters​
Name | Type |
---|---|
err | any |
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​
Name | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
Returns​
any
Inherited from​
Error.prepareStackTrace