#
Class: ValidationError<T>core.ValidationError
#
Type parametersName | Type | Default |
---|---|---|
T | AnyEntity | AnyEntity |
#
HierarchyError
↳ ValidationError
↳↳ OptimisticLockError
↳↳ MetadataError
↳↳ NotFoundError
#
Constructors#
constructor+ new ValidationError<T>(message
: string, entity?
: T): ValidationError<T>
#
Type parameters:Name | Type | Default |
---|---|---|
T | AnyEntity<any> | AnyEntity<any> |
#
Parameters:Name | Type |
---|---|
message | string |
entity? | T |
Returns: ValidationError<T>
Overrides: void
Defined in: packages/core/src/errors.ts:4
#
Properties#
message• message: string
Inherited from: void
Defined in: docs/node_modules/typescript/lib/lib.es5.d.ts:974
#
name• name: string
Inherited from: void
Defined in: docs/node_modules/typescript/lib/lib.es5.d.ts:973
#
prepareStackTrace• Optional
prepareStackTrace: (err
: Error, stackTraces
: CallSite[]) => any
Optional override for formatting stack traces
see
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
#
Type declaration:â–¸ (err
: Error, stackTraces
: CallSite[]): any
#
Parameters:Name | Type |
---|---|
err | Error |
stackTraces | CallSite[] |
Returns: any
Defined in: node_modules/@types/node/globals.d.ts:11
Defined in: node_modules/@types/node/globals.d.ts:11
#
stack• Optional
stack: string
Inherited from: void
Defined in: docs/node_modules/typescript/lib/lib.es5.d.ts:975
#
stackTraceLimit• stackTraceLimit: number
Defined in: node_modules/@types/node/globals.d.ts:13
#
Methods#
captureStackTraceâ–¸ captureStackTrace(targetObject
: object, constructorOpt?
: Function): void
Create .stack property on a target object
#
Parameters:Name | Type |
---|---|
targetObject | object |
constructorOpt? | Function |
Returns: void
Defined in: node_modules/@types/node/globals.d.ts:4
#
getEntityâ–¸ getEntity(): undefined | AnyEntity<any>
Gets instance of entity that caused this error.
Returns: undefined | AnyEntity<any>
Defined in: packages/core/src/errors.ts:17
#
cannotCommitâ–¸ Static
cannotCommit(): ValidationError<AnyEntity<any>>
Returns: ValidationError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:96
#
cannotModifyInverseCollectionâ–¸ Static
cannotModifyInverseCollection(owner
: AnyEntity<any>, property
: EntityProperty<any>): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
owner | AnyEntity<any> |
property | EntityProperty<any> |
Returns: ValidationError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:79
#
cannotModifyReadonlyCollectionâ–¸ Static
cannotModifyReadonlyCollection(owner
: AnyEntity<any>, property
: EntityProperty<any>): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
owner | AnyEntity<any> |
property | EntityProperty<any> |
Returns: ValidationError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:88
#
cannotUseOperatorsInsideEmbeddablesâ–¸ Static
cannotUseOperatorsInsideEmbeddables(className
: string, propName
: string, payload
: Dictionary<any>): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
className | string |
propName | string |
payload | Dictionary<any> |
Returns: ValidationError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:100
#
entityNotManagedâ–¸ Static
entityNotManaged(entity
: AnyEntity<any>): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
entity | AnyEntity<any> |
Returns: ValidationError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:43
#
fromCollectionNotInitializedâ–¸ Static
fromCollectionNotInitialized(entity
: AnyEntity<any>, prop
: EntityProperty<any>): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
entity | AnyEntity<any> |
prop | EntityProperty<any> |
Returns: ValidationError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:28
#
fromMergeWithoutPKâ–¸ Static
fromMergeWithoutPK(meta
: EntityMetadata<any>): void
#
Parameters:Name | Type |
---|---|
meta | EntityMetadata<any> |
Returns: void
Defined in: packages/core/src/errors.ts:35
#
fromWrongPropertyTypeâ–¸ Static
fromWrongPropertyType(entity
: AnyEntity<any>, property
: string, expectedType
: string, givenType
: string, givenValue
: string): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
entity | AnyEntity<any> |
property | string |
expectedType | string |
givenType | string |
givenValue | string |
Returns: ValidationError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:21
#
invalidCompositeIdentifierâ–¸ Static
invalidCompositeIdentifier(meta
: EntityMetadata<any>): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
meta | EntityMetadata<any> |
Returns: ValidationError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:92
#
invalidEmbeddableQueryâ–¸ Static
invalidEmbeddableQuery(className
: string, propName
: string, embeddableType
: string): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
className | string |
propName | string |
embeddableType | string |
Returns: ValidationError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:104
#
invalidPropertyNameâ–¸ Static
invalidPropertyName(entityName
: string, invalid
: string): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
entityName | string |
invalid | string |
Returns: ValidationError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:65
#
invalidTypeâ–¸ Static
invalidType(type
: Constructor<any>, value
: any, mode
: string): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
type | Constructor<any> |
value | any |
mode | string |
Returns: ValidationError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:69
#
notDiscoveredEntityâ–¸ Static
notDiscoveredEntity(data
: any, meta?
: EntityMetadata<any>): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
data | any |
meta? | EntityMetadata<any> |
Returns: ValidationError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:52
#
notEntityâ–¸ Static
notEntity(owner
: AnyEntity<any>, prop
: EntityProperty<any>, data
: any): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
owner | AnyEntity<any> |
prop | EntityProperty<any> |
data | any |
Returns: ValidationError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:47
#
transactionRequiredâ–¸ Static
transactionRequired(): ValidationError<AnyEntity<any>>
Returns: ValidationError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:39