Skip to main content
Version: Next

Class: EntityValidator

core.EntityValidator

Constructors#

constructor#

new EntityValidator(strict)

Parameters#

NameType
strictboolean

Defined in#

packages/core/src/entity/EntityValidator.ts:6

Methods#

validate#

validate<T>(entity, payload, meta): void

Type parameters#

NameType
TT: AnyEntity<T>

Parameters#

NameType
entityT
payloadany
metaEntityMetadata<any>

Returns#

void

Defined in#

packages/core/src/entity/EntityValidator.ts:10


validateEmptyWhere#

validateEmptyWhere<T>(where): void

Type parameters#

NameType
TT: AnyEntity<T>

Parameters#

NameType
whereFilterQuery<T>

Returns#

void

Defined in#

packages/core/src/entity/EntityValidator.ts:86


validateParams#

validateParams(params, type?, field?): void

Parameters#

NameTypeDefault value
paramsanyundefined
typestring'search condition'
field?stringundefined

Returns#

void

Defined in#

packages/core/src/entity/EntityValidator.ts:62


validatePrimaryKey#

validatePrimaryKey<T>(entity, meta): void

Type parameters#

NameType
TT: AnyEntity<T>

Parameters#

NameType
entityEntityData<T>
metaEntityMetadata<any>

Returns#

void

Defined in#

packages/core/src/entity/EntityValidator.ts:78


validateProperty#

validateProperty<T>(prop, givenValue, entity): any

Type parameters#

NameType
TT: AnyEntity<T>

Parameters#

NameType
propEntityProperty<any>
givenValueany
entityT

Returns#

any

Defined in#

packages/core/src/entity/EntityValidator.ts:41